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

Fix BLIK bindings #6376

Merged
merged 3 commits into from
Mar 16, 2023
Merged

Fix BLIK bindings #6376

merged 3 commits into from
Mar 16, 2023

Conversation

eurias-stripe
Copy link
Contributor

Summary

BLIK was returning a cancelled status in bindings because the next action was not treated as a successful status.

Motivation

https://jira.corp.stripe.com/browse/RUN_MOBILESDK-2179

Testing

Added example activity to visually verify.

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

Before After
Screenshot_20230316_112054 Screenshot_20230316_112145

Changelog

  • [Fixed] Fixed BLIK payment bindings.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 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.3 MiB │   3.3 MiB │  +8 B │   7.1 MiB │   7.1 MiB │  0 B 
     arsc │   2.1 MiB │   2.1 MiB │   0 B │   2.1 MiB │   2.1 MiB │  0 B 
 manifest │   4.4 KiB │   4.4 KiB │   0 B │    21 KiB │    21 KiB │  0 B 
      res │     1 MiB │     1 MiB │   0 B │   1.8 MiB │   1.8 MiB │  0 B 
   native │   2.6 MiB │   2.6 MiB │   0 B │     6 MiB │     6 MiB │  0 B 
    asset │     3 MiB │     3 MiB │  +1 B │     3 MiB │     3 MiB │ +1 B 
    other │ 200.3 KiB │ 200.3 KiB │  +2 B │ 454.2 KiB │ 454.2 KiB │  0 B 
──────────┼───────────┼───────────┼───────┼───────────┼───────────┼──────
    total │  12.2 MiB │  12.2 MiB │ +11 B │  20.5 MiB │  20.5 MiB │ +1 B 

 DEX     │ old   │ new   │ diff      
─────────┼───────┼───────┼───────────
   files │     1 │     1 │ 0         
 strings │ 35169 │ 35169 │ 0 (+0 -0) 
   types │ 11505 │ 11505 │ 0 (+0 -0) 
 classes │  9648 │  9648 │ 0 (+0 -0) 
 methods │ 51681 │ 51681 │ 0 (+0 -0) 
  fields │ 32563 │ 32563 │ 0 (+0 -0) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  333 │  333 │  0   
 entries │ 6877 │ 6877 │  0
APK
    compressed    │   uncompressed   │                               
──────────┬───────┼───────────┬──────┤                               
 size     │ diff  │ size      │ diff │ path                          
──────────┼───────┼───────────┼──────┼───────────────────────────────
  3.3 MiB │  +8 B │   7.1 MiB │  0 B │ ∆ classes.dex                 
 65.4 KiB │  +4 B │ 146.8 KiB │  0 B │ ∆ META-INF/CERT.SF            
  1.2 KiB │  -3 B │   1.2 KiB │  0 B │ ∆ META-INF/CERT.RSA           
  6.3 KiB │  +1 B │   6.2 KiB │ +1 B │ ∆ assets/dexopt/baseline.prof 
 50.6 KiB │  +1 B │ 146.7 KiB │  0 B │ ∆ META-INF/MANIFEST.MF        
──────────┼───────┼───────────┼──────┼───────────────────────────────
  3.4 MiB │ +11 B │   7.4 MiB │ +1 B │ (total)

StripeIntent.NextActionType.WeChatPayRedirect,
StripeIntent.NextActionType.CashAppRedirect,
null -> {
false
}
StripeIntent.NextActionType.BlikAuthorize,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI, this and the change in PaymentIntent is the actual fix, everything else is to add the example.

@jameswoo-stripe
Copy link
Contributor

Should the example app include a BLIK code that users can enter?

image

@eurias-stripe
Copy link
Contributor Author

Should the example app include a BLIK code that users can enter?

It could, and I thought about it, but the code does nothing in test mode, so there isn't much point in adding it, but if you think we need it I'll add it.

@jameswoo-stripe
Copy link
Contributor

jameswoo-stripe commented Mar 16, 2023

I tested some error scenarios and tested the limit_exceeded case. It does not work as expected:

The confirmation succeeds on the client:

On dashboard it is a fail, which it should be:

You can inspect this payment intent: pi_3MmNaBKG6vc7r7YC0xZTTZE9

@eurias-stripe
Copy link
Contributor Author

Interesting, thanks for the scenarios link, I'll test those

@eurias-stripe
Copy link
Contributor Author

Ok, I see what's going on here, the payment fails after the secondary action, but the client only receives a response after creating the PI, here is what the PI looks like after it is created and the client receives it:

Screen Shot 2023-03-16 at 2 00 40 PM

It has status=requires_action and next_action_data=BlikAuthorize, however after the PI is processed it changes to the requires_payment_method status, https://admin.corp.stripe.com/payment_intent/pi_3MmNtIKG6vc7r7YC0dvdfOau.

As explained in the docs, it means that this part of the flow has succeeded but there is still another step that the customer needs to take.

@jameswoo-stripe
Copy link
Contributor

Makes sense to me, thank you!

@eurias-stripe eurias-stripe merged commit 134ed12 into master Mar 16, 2023
@eurias-stripe eurias-stripe deleted the eurias/blik branch March 16, 2023 21:45
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