You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since 2.4.6, it is possible to make refunds from Payment Intents (pi_) tokens, while the previous version only allowed to use charges tokens, which is great.
However it seems there is a downside in the new implementation that makes impossible to create a refund using a py_ token even though the Stripe API allows it and treat it as a charge token.
In my case, I use Sepa Debits and the API gives me a py_ token only. I found no way to get a ch_ or pi_ token associated to the payment.
If I try to pass a py_ token to the Refund->create() method (which I got working for long) , now I get an a No such payment_intent: 'py_[...]' error.
For now I manage to make refund bypassing the Refund->create() method, this way :
Hey!
Since 2.4.6, it is possible to make refunds from Payment Intents (pi_) tokens, while the previous version only allowed to use charges tokens, which is great.
However it seems there is a downside in the new implementation that makes impossible to create a refund using a py_ token even though the Stripe API allows it and treat it as a charge token.
In my case, I use Sepa Debits and the API gives me a py_ token only. I found no way to get a ch_ or pi_ token associated to the payment.
If I try to pass a py_ token to the Refund->create() method (which I got working for long) , now I get an a
No such payment_intent: 'py_[...]'
error.For now I manage to make refund bypassing the Refund->create() method, this way :
A solution can be to invert the ternary mentioned below, to use the charge mode by default, and the PaymentIntent only if
$paymentId
is a pi_ token ?stripe/src/Api/Refunds.php
Line 103 in 482671a
Many thanks! and long live this package!
The text was updated successfully, but these errors were encountered: