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

Wechat Pay and Alipay not displaying on the payment sheet #2024

Open
FortySL opened this issue Jan 2, 2025 · 4 comments
Open

Wechat Pay and Alipay not displaying on the payment sheet #2024

FortySL opened this issue Jan 2, 2025 · 4 comments
Labels
Awaiting response Awaiting response from the issuer needs triage Needs triage

Comments

@FortySL
Copy link

FortySL commented Jan 2, 2025

Describe the bug
First of all, much appreciation to all contributors of this plugin. This is an amazing piece of work—great job! And Happy New Year, everyone!

I am using this plugin to enable payment in my Flutter app created for a Chinese customer. Currently, the Apple Pay button and card form display successfully. However, the Alipay and WeChat Pay options required by the customer are not showing on the payment sheet. I have double-checked with Stripe, and both Alipay and WeChat Pay are enabled for the sandbox account, but they still do not appear on the payment sheet.

I noticed in the changelog that WeChat Pay was temporarily disabled with the release of version 2.0.0. Has it been re-enabled?

To Reproduce
Steps to reproduce the behavior:

  1. Enable both Alipay and WeChat Pay in the Stripe Dashboard under payment methods.
    2

  2. In Stripe's manual integration options, request access for both Alipay and WeChat Pay. Confirm they are marked as ready to integrate.
    3

  3. Generate a payment intent:
    "stripe payment_intents create --amount="2000" --currency="cny" --payment-method-configuration="pmc_1Qb*************" "

  4. Display the payment sheet:

TextButton(  
  onPressed: () async {  
    await Stripe.instance.initPaymentSheet(  
      paymentSheetParameters: const SetupPaymentSheetParameters(  
        paymentIntentClientSecret: 'pi_3QcdEyRPg154hYMx0FTg15YX_secret_PzD*****************Zf',  
        merchantDisplayName: '**** *****',  
        applePay: PaymentSheetApplePay(merchantCountryCode: 'AU'),  
      ),  
    ).then((value) async {  
      Stripe.instance.presentPaymentSheet();  
    });  
  },  
  child: const Text('TEST PAYMENT'),  
)  

Expected behavior
Alipay and WeChat Pay should be displayed alongside other payment options.

Smartphone / tablet

  • Device: iPHONE 12 PRO MAX
  • OS: IOS 17
  • Package version: 11.3.0
  • Flutter version 3.24.5

Additional context
Condition: wechat_pay and alipay are both installed and tested in the test device
Result: Only Apple Pay, Pay with Link, and the card form are displayed on the payment sheet.
1

@FortySL FortySL added the needs triage Needs triage label Jan 2, 2025
@remonh87
Copy link
Member

remonh87 commented Jan 2, 2025

@FortySL thank you for your message (happy new year as well). About your questions:

  • AliPay: this should work without any issues. I think AliPay is not showing because you didn't specify the return url in the paymentsheet parameters. If you do this it should work.
  • Wechat: currently Stripe does not support wechat on mobile. I think it has to do with adding a heavy sdk (wechatpay sdk) but if you want to learn more I would recommend contacting support. Source

Hope this helps

@remonh87 remonh87 added the Awaiting response Awaiting response from the issuer label Jan 2, 2025
@FortySL
Copy link
Author

FortySL commented Jan 3, 2025

Hi @remonh87

Thank you for your response. I’m disappointed to hear that WeChat Pay isn’t directly supported. However, if there’s any helpful content or guidance on integrating WeChat Pay, I’d be very interested to learn more.

Regarding Alipay, I experimented with using a fake return URL in the payment sheet parameters, and I was able to see the Alipay button — which is great! However, I’m unsure whether this URL needs to be included during the intent creation process. Could you clarify this?

As for the return URL itself, after reviewing the documentation, it seems that for mobile applications, it can be an app URI scheme. I’m not very experienced with this aspect. I’ve previously used URI schemes for email authentication with Firebase, but I’m not sure what constitutes an acceptable return URL for Stripe payments.

1

I created one based on my app name as the URL scheme, but when I tried passing it, I received an “Invalid URL: an explicit scheme must be provided” error. Could you provide more guidance on this or point me to relevant examples or documentation? I’d greatly appreciate any help you can offer.

Lastly, I noticed a fantastic template for the iOS SDK that uses a vertical layout for the payment method in the payment sheet. Are there any parameters we can use to achieve this layout in our payment sheet?

2

Sorry for asking so much question here, Thank you again for your assistance!

Best regards,
Lei

@FortySL FortySL closed this as completed Jan 3, 2025
@FortySL FortySL reopened this Jan 3, 2025
@FortySL FortySL closed this as completed Jan 3, 2025
@FortySL FortySL reopened this Jan 3, 2025
@FortySL
Copy link
Author

FortySL commented Jan 3, 2025

Sorry, miss click on the close button and reopen button :L

@FortySL
Copy link
Author

FortySL commented Jan 5, 2025

Hi, is there any updates ~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting response Awaiting response from the issuer needs triage Needs triage
Projects
None yet
Development

No branches or pull requests

2 participants