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

Add AmazonPay as a new payment method to Android PaymentSheet #7199

Merged
merged 6 commits into from
Aug 24, 2023

Conversation

lisaliu-stripe
Copy link
Contributor

Summary

Added Amazon Pay as a new payment method to Android PaymentSheet according to this guide.

Motivation

https://jira.corp.stripe.com/browse/THREEP_API-956

Testing

  • Added tests
  • Modified tests
  • Manually verified
    Ran payment sheet example to verify the new payment method is working.

Screenshots

Before After
before screenshot after screenshot
Screenshot 2023-08-24 at 3 09 37 PM

Changelog

[Added] Support for AmazonPay (private beta).

@lisaliu-stripe lisaliu-stripe requested review from a team as code owners August 24, 2023 19:10
Copy link
Collaborator

@tillh-stripe tillh-stripe left a comment

Choose a reason for hiding this comment

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

Looks good! Small note about the release notes and the ignored test.

CHANGELOG.md Outdated Show resolved Hide resolved
"async": false,
"selector_icon": {
"light_theme_png": "https://js.stripe.com/v3/fingerprinted/img/payment-methods/icon-pm-amazonpay_light-96e2ad49ffa7c7536dec91adaf68e898.png",
"light_theme_svg": "https://js.stripe.com/v3/fingerprinted/img/payment-methods/icon-pm-amazonpay_light-711d254c9501ae4678f0046e7bb5e615.svg",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: We could remove the SVG part, because we only use the PNGs on Android.

merchantCountryCode = "US",
)

@Ignore("Complex authorization handling required")
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should figure this out before we merge this. Happy to help with that!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, I noticed that the issue is in the Web view. Is this something that will be fixed in the near future?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure about that, it will be updated to Amazon's own page once they start to build it out, so I marked it as ignored for now

@github-actions
Copy link
Contributor

github-actions bot commented Aug 24, 2023

Diffuse output:

OLD: paymentsheet-example-release-master.apk (signature: V1, V2)
NEW: paymentsheet-example-release-pr.apk (signature: V1, V2)

          │            compressed            │           uncompressed            
          ├───────────┬───────────┬──────────┼───────────┬───────────┬───────────
 APK      │ old       │ new       │ diff     │ old       │ new       │ diff      
──────────┼───────────┼───────────┼──────────┼───────────┼───────────┼───────────
      dex │   3.5 MiB │   3.5 MiB │    +69 B │   7.8 MiB │   7.8 MiB │    +200 B 
     arsc │   2.1 MiB │   2.1 MiB │   +768 B │   2.1 MiB │   2.1 MiB │    +768 B 
 manifest │   4.9 KiB │   4.9 KiB │      0 B │  24.1 KiB │  24.1 KiB │       0 B 
      res │ 867.5 KiB │ 876.3 KiB │ +8.8 KiB │   1.3 MiB │   1.3 MiB │ +19.1 KiB 
   native │   2.6 MiB │   2.6 MiB │      0 B │     6 MiB │     6 MiB │       0 B 
    asset │     3 MiB │     3 MiB │    +86 B │     3 MiB │     3 MiB │    +660 B 
    other │ 199.6 KiB │ 199.7 KiB │   +141 B │ 446.5 KiB │ 446.8 KiB │    +328 B 
──────────┼───────────┼───────────┼──────────┼───────────┼───────────┼───────────
    total │  12.3 MiB │  12.3 MiB │ +9.8 KiB │  20.7 MiB │  20.7 MiB │ +21.1 KiB 

 DEX     │ old   │ new   │ diff       
─────────┼───────┼───────┼────────────
   files │     1 │     1 │  0         
 strings │ 38224 │ 38226 │ +2 (+3 -1) 
   types │ 12644 │ 12644 │  0 (+0 -0) 
 classes │ 10668 │ 10668 │  0 (+0 -0) 
 methods │ 56030 │ 56030 │  0 (+0 -0) 
  fields │ 35182 │ 35183 │ +1 (+1 -0) 

 ARSC    │ old  │ new  │ diff       
─────────┼──────┼──────┼────────────
 configs │  290 │  290 │  0         
 entries │ 6922 │ 6924 │ +2 (+2 -0)
APK
     compressed      │     uncompressed      │                        
──────────┬──────────┼───────────┬───────────┤                        
 size     │ diff     │ size      │ diff      │ path                   
──────────┼──────────┼───────────┼───────────┼────────────────────────
  4.4 KiB │ +4.4 KiB │   9.3 KiB │  +9.3 KiB │ + res/Uo.xml           
  4.4 KiB │ +4.4 KiB │   9.8 KiB │  +9.8 KiB │ + res/BT.xml           
  2.1 MiB │   +768 B │   2.1 MiB │    +768 B │ ∆ resources.arsc       
  2.4 KiB │    +86 B │  19.2 KiB │    +660 B │ ∆ assets/lpms.json     
 62.7 KiB │    +70 B │ 140.9 KiB │    +164 B │ ∆ META-INF/CERT.SF     
 48.5 KiB │    +70 B │ 140.8 KiB │    +164 B │ ∆ META-INF/MANIFEST.MF 
  3.5 MiB │    +69 B │   7.8 MiB │    +200 B │ ∆ classes.dex          
    951 B │     +1 B │   2.5 KiB │       0 B │ ∆ res/9N.xml           
    598 B │     -1 B │   1.1 KiB │       0 B │ ∆ res/NO.xml           
    489 B │     -1 B │     836 B │       0 B │ ∆ res/UZ.xml           
  1.2 KiB │     +1 B │   1.2 KiB │       0 B │ ∆ META-INF/CERT.RSA    
──────────┼──────────┼───────────┼───────────┼────────────────────────
  5.8 MiB │ +9.8 KiB │  10.2 MiB │ +21.1 KiB │ (total)
DEX
STRINGS:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   38224 │ 38226 │ +2 (+3 -1) 
  + AmazonPay
  + amazon_pay
  + ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:d40fd68,r8-mode:full,version:8.0.46}
  
  - ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:b8603e1,r8-mode:full,version:8.0.46}
  

FIELDS:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   35182 │ 35183 │ +1 (+1 -0) 
  + me.a0 u: z
ARSC
ENTRIES:

   old  │ new  │ diff       
  ──────┼──────┼────────────
   6922 │ 6924 │ +2 (+2 -0) 
  + drawable/stripe_ic_paymentsheet_pm_amazon_pay
  + string/stripe_paymentsheet_payment_method_amazon_pay

CHANGELOG.md Outdated
@@ -5,6 +5,7 @@
### PaymentSheet
* [CHANGED][7144](https://github.com/stripe/stripe-android/pull/7144) PaymentSheet now features rounded corners with the radius provided in `PaymentSheet.Shapes.cornerRadiusDp`.
* [FIXED][7190](https://github.com/stripe/stripe-android/pull/7190) Fixed an issue where amounts in Laotian Kip were displayed incorrectly.
* [ADDED][7199](https://github.com/stripe/stripe-android/pull/7199) PaymentSheet now supports AmazonPay for PaymentIntents in private beta.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: Can you move this to the top spot above the first CHANGED note?

@lisaliu-stripe lisaliu-stripe merged commit e2bdab3 into master Aug 24, 2023
@lisaliu-stripe lisaliu-stripe deleted the lisaliu/amazonpay branch August 24, 2023 21:36
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.

2 participants