capacitor-community / stripe

Stripe Mobile SDK wrapper for Capacitor
MIT License
185 stars 74 forks source link

iOS Stripe.payWithApplePay() returns 'unable to parse apple pay options' #54

Closed giuseeFG closed 2 years ago

giuseeFG commented 3 years ago

I'm trying to call "payWithApplePay" in this way:

                    Stripe.payWithApplePay({
                        applePayOptions: {
                            merchantId: 'merchant.xxx.xxx',
                            country: 'IT',
                            currency: 'EUR',
                            items: [{
                                label: 'my_item_name',
                                amount: '1'
                            }]
                        }
                    }).then((res: any) => {
                        console.log('RES', res);
                    }).catch((e: any) => {
                        console.error('ERROR ', e);
                    });

I'm, ALWAYS getting this response in xCode:

{
  "errorMessage": "Impossibile completare l'operazione. (Errore CapacitorCommunityStripe.StripePluginError 0).",
  "message": "unable to parse apple pay options: Impossibile completare l'operazione. (Errore CapacitorCommunityStripe.StripePluginError 0)."
}

The configuration on Stripe has been made correctly:

Schermata 2021-02-01 alle 15 05 31

Google Pay, instead, works like a charm!

Can anybody help me?

moblizeit commented 3 years ago

i am facing the same error

moblizeit commented 3 years ago

ok i found. the amount should be number and not in quotes

rdlabo commented 2 years ago

Thanks for issue! Today this plugin of v3 is released. This not compatible with v1. All APIs have been revamped. So I will close this issue. If you still have the same problem, please create a new Issue. Thank you.