Transaction failed: MissingPluginException(No implementation found for method createPaymentMethod on channel stripe_payment)
coder-Aayush opened this issue · 2 comments
coder-Aayush commented
I am trying to implement stripe within my flutter app. I got the following error while integrating the latest version of this plugin.
Transaction failed: MissingPluginException(No implementation found for method createPaymentMethod on channel stripe_payment)
code
Future<StripeTransactionResponse> payWithNewCard(
{String amount, String currency}) async {
try {
var paymentMethod = await StripePayment.paymentRequestWithCardForm(
CardFormPaymentRequest());
var paymentIntent =
await _StripeService.createPaymentIntent(amount, currency);
var response = await StripePayment.confirmPaymentIntent(PaymentIntent(
clientSecret: paymentIntent['client_secret'],
paymentMethodId: paymentMethod.id));
if (response.status == 'succeeded') {
print('success');
return new StripeTransactionResponse(
message: 'Transaction successful', success: true);
} else {
print('failed');
return new StripeTransactionResponse(
message: 'Transaction failed', success: false);
}
} on PlatformException catch (err) {
return _StripeService.getPlatformExceptionErrorResult(err);
} catch (err) {
return new StripeTransactionResponse(
message: 'Transaction failed: ${err.toString()}', success: false);
}
}
Thanks for Response
vijaypareek13 commented
Yes i got the same result
ayaanpathan commented
run flutter clean and rebuild your code