Created
March 20, 2020 23:23
-
-
Save hamza39460/02662a270f4f1fad7633be46e8733872 to your computer and use it in GitHub Desktop.
Flutter Confirm payment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
confirmPayment(String sec, PaymentMethod paymentMethod) { | |
StripePayment.confirmPaymentIntent( | |
PaymentIntent(clientSecret: sec, paymentMethodId: paymentMethod.id), | |
).then((val) { | |
addPaymentDetailsToFirestore(); //Function to add Payment details to firestore | |
final snackBar = SnackBar(content: Text('Payment Successfull'),); | |
Scaffold.of(context).showSnackBar(snackBar); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment