#AlienSoft
1 messages · Page 1 of 1 (latest)
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'],
]
);
}
That' managed at the PaymentIntent level, you set the currency at the Intent leve, same PaymentMethod can be used in multiple currencies
this is updating the paymentIntent, but how do i refresh/re-display the cardelements as they need to be changing too ?
update the sown payment methods ?
You can track that in your integration and assign each PaymentMethod to a currency, but not at Stripe level
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.
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
In order to achieve your particular use case, yes.
Hi! I'm taking over my colleague. Please, let me know if you have any other questions.