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

This merchant is having trouble accepting your payment right now. Try using a different payment method. [OR_BIBED_06] #287

Open
Usama9999 opened this issue Jan 2, 2025 · 1 comment

Comments

@Usama9999
Copy link

My Code:

pay.GooglePayButton(
paymentConfiguration: pay.PaymentConfiguration.fromJsonString('''{
"provider": "google_pay",
"data": {
"environment": "TEST",
"apiVersion": 2,
"apiVersionMinor": 0,
"allowedPaymentMethods": [{
"type": "CARD",
"tokenizationSpecification": {
"type": "PAYMENT_GATEWAY",
"parameters": {
"gateway": "stripe",
"stripe:version": "2022-11-15",
"stripe:publishableKey": "pk_test_..."
}
},
"parameters": {
"allowedCardNetworks": ["VISA", "MASTERCARD"],
"allowedAuthMethods": ["PAN_ONLY", "CRYPTOGRAM_3DS"],
"billingAddressRequired": true,
"billingAddressParameters": {
"format": "FULL",
"phoneNumberRequired": true
}
}
}],
"merchantInfo": {
"merchantId": "BR.....",
"merchantName": "E....."
},
"transactionInfo": {
"countryCode": "US",
"currencyCode": "USD"
}
}
}'''),
paymentItems: [
pay.PaymentItem(
amount: (int.parse(controller.amount ?? '0') +
(int.parse(controller.amount ?? '0') *
(controller.paymentMethodModel?.eureecaFee ?? 0)))
.floor()
.toString(),
type: pay.PaymentItemType.total,
label: 'Add money into Eureeca wallet')
],
width: double.infinity,
height: 48,
type: pay.GooglePayButtonType.pay,
cornerRadius: 4,
margin: const EdgeInsets.only(top: 15.0),
onPaymentResult: (paymentResult) async {
TokenData token =
await Stripe.instance.createApplePayToken(paymentResult);

        final params = PaymentMethodParams.cardFromToken(
            paymentMethodData: PaymentMethodDataCardFromToken(
          token: token.id,
          billingDetails: BillingDetails(
            phone: controller.phone.text,
            email: LocalStorageProvider.instance.getUser()?.email ?? "",
            name: controller.name.text,
          ),
        ));

        PaymentMethod paymentMode =
            await Stripe.instance.createPaymentMethod(params: params);

        controller.confirmStripePayment(paymentMode, null);
      },
      loadingIndicator: const Center(
        child: CircularProgressIndicator(),
      ),
    ),
    
    Can some one please help me what's wrong here?
    Thanks
@MArteenDEV

This comment was marked as spam.

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

No branches or pull requests

2 participants