1

I want to integrate Alipay in my flutter application using stripe payments. I am able to add cards and they are working fine. But for Alipay, I can't find any proper solution. Can anyone please help me.

var source = await StripePayment.createSourceWithParams(SourceParams(
        returnURL: 'https://shop.example.com/crtA6B28E1',
        type: 'alipay',
        amount: int.parse(amount),
        currency: currency))
    .then((value) => print(value.sourceId));

I tried this code to create a source but it is giving me error

[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(invalidRequest, null, null) E/flutter (17877): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)

nvoigt
  • 75,013
  • 26
  • 93
  • 142
Shivank
  • 95
  • 1
  • 1
  • 5
  • Does your stripe account support alipay? Stripe allows credit cards by default, you need to contact them for any other payment type. – nvoigt Jul 30 '20 at 09:23
  • yes, my account support Alipay. The company has provided me and it's showing active in my dashboard – Shivank Jul 30 '20 at 09:38
  • is there a more detailed error on https://dashboard.stripe.com/test/logs maybe (like the backend API returns an error that you only see as invalidRequest in the app?) – karllekko Jul 30 '20 at 09:41
  • Stripe normally replies with a very detailed, non-technical, plain English error message while you are testing. Use whatever means you have to get the body of that failed call, it will contain the answer to your question. – nvoigt Jul 30 '20 at 09:49
  • Can anyone provide me a document to implement Stripe for Ali Pay using flutter? – Shivank Jul 31 '20 at 23:39

0 Answers0