#AlienSoft

1 messages · Page 1 of 1 (latest)

fleet socketBOT
fleet citrus
#

if ($_GET['currency'] == 'GBP') {
$intent_response = \Stripe\PaymentIntent::update(
$_GET['intentId'],
[
'currency' => "GBP",
'amount' => $_GET['price']*100,
'payment_method_types' => ['card', 'wechat', 'alipay'],
]
);
} else {
$intent_response = \Stripe\PaymentIntent::update(
$_GET['intentId'],
[
'currency' => "EUR",
'amount' => $_GET['price']*100,
'payment_method_types' => ['card', 'ideal'],
]
);
}

sonic locust
#

That' managed at the PaymentIntent level, you set the currency at the Intent leve, same PaymentMethod can be used in multiple currencies

fleet citrus
#

this is updating the paymentIntent, but how do i refresh/re-display the cardelements as they need to be changing too ?

sonic locust
#

update the sown payment methods ?
You can track that in your integration and assign each PaymentMethod to a currency, but not at Stripe level

fleet citrus
#

how?

#

<div id="payment-element">
<!--Stripe.js injects the Payment Element-->
</div>

#

this needs updating to refresh/show the card types available depending on the updated currency.

sonic locust
#

Not using Stripe Component, because at Stripe Levels some PaymentMethods can be used in multiple currencies.

#

you need to manage this by your integration, not using Stripe Uis

fleet citrus
#

lol ?

#

You mean i need to customize everything ?

sonic locust
#

In order to achieve your particular use case, yes.

fleet socketBOT
high trail
#

Hi! I'm taking over my colleague. Please, let me know if you have any other questions.