Quantcast
Channel: Active questions tagged paypal - Stack Overflow
Viewing all articles
Browse latest Browse all 468

PayPal buttons with multiple currencies using react-paypal-js

$
0
0

Try to change my currency, but when I use currency_code: 'EUR' I'm getting this error:

Error: Unexpected currency: EUR passed to order.create. Please ensure you are passing /sdk/js?currency=EUR in the paypal script tag.

When I go only with the currency: 'EUR' from the initialOptions and remove it from the PayPalButtons then it is using the Amount in USD and change it to EUR. But not everything is in Euro.

const initialOptions = {'client-id': 'test',  currency: 'EUR',  intent: 'capture',};<PayPalScriptProvider options={initialOptions}><PayPalButtons        createOrder={(data, actions) => {            return actions.order.create({                purchase_units: [{                                  description:'Rechnung '+                                    dayjs(date, 'MM/YYYY').format('MMMM YYYY'),                                  amount: {                                    currency_code: 'EUR',                                    value: 2                                }]/></PayPalScriptProvider>

Viewing all articles
Browse latest Browse all 468

Trending Articles