Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NT-204] Manage pledge payment section apple pay #888

Merged
merged 20 commits into from
Oct 14, 2019

Conversation

Scollaco
Copy link
Contributor

📲 What

  • Shows ApplePay flag on ManagePledgeViewController if project was pledged using ApplePay

🤔 Why

  • So the user can see not only the card infos (number, expiration, etc), but also if the pledge was done through ApplePay.

🛠 How

  • Creating a PaymentType enum
  • Adding the ApplePay icon provided by Apple
  • Updating tests

👀 See

Before 🐛 After 🦋
image image

📖 Story

NT-204

✅ Acceptance criteria

Choose a project backed using ApplePay and go to the ManagePledge screen :

  • The ApplePay icon and the infos of the card used should be visible.
  • If a project was backed using credit card (not using ApplePay), the card brand icon and its infos should be visible.

Copy link
Contributor

@ifbarrera ifbarrera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed the screenshots for the Settings PaymentMethodsViewController were updated. Any idea why? They shouldn't have changed.

"images" : [
{
"idiom" : "universal",
"filename" : "icon--apple_pay.pdf"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we've typically preferred dashes over underscores for asset names, so this should be icon--apple-pay instead of icon--apple_pay

@@ -14,7 +14,7 @@ final class BackingTests: XCTestCase {
"expiration_date": "2019-09-23",
"id": 20,
"last_four": "1234",
"payment_type": "CREDIT_CARD",
"payment_type": "APPLE_PAY",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to change this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, I had changed it just to make sure everything was working. I will revert it 👍

@@ -27,6 +27,11 @@ public struct GraphUserCreditCard: Swift.Decodable {
}
}

public enum PaymentType: String, Swift.Decodable, CaseIterable {
case applePay = "APPLE_PAY"
case card = "CREDIT_CARD"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if creditCard would be more explicit here so we can differentiate between credit cards and debit cards in the future.

Copy link
Contributor Author

@Scollaco Scollaco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed the screenshots for the Settings PaymentMethodsViewController were updated. Any idea why? They shouldn't have changed.

I paired on that with @justinswart on this and it seems that this change is made by XCode when we add a new asset, but visually there's no difference between images.

@Scollaco Scollaco merged commit 033bb19 into master Oct 14, 2019
@Scollaco Scollaco deleted the manage-pledge-payment-section-apple-pay branch October 14, 2019 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants