#tomasfejfar_code
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1357323935011573913
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- tomasfejfar_code, 2 hours ago, 40 messages
- tomasfejfar_code, 21 hours ago, 93 messages
- tomasfejfar_code, 1 day ago, 23 messages
It says that it's removed
And to check payments object
I checked inpay_0R9mTe6BNHJembTsSEn7UDpl
PaymentIntent now has latest_charge property
And the charge is not there
Aha!
so get payments from there i get payment intent and from there paymentIntent id and I receive the P.I. and from it the chargeId ooof ๐
Yes
Where did paid_out_of_band go?
It's not in payment intent
And it's no longer in invoice
Removed the payment_intent, charge, paid, and paid_out_of_band fields from the Invoice object.
Good question, not sure actually...
You can mark it as paid_out_of_band when you pay the Invoice: https://docs.stripe.com/api/invoices/pay#pay_invoice-paid_out_of_band
But not sure it's saved anywhere. I guess in this case the attached PaymentIntent is cancelled
So if paymentIntent is canceled I can be sure it's paid out of band?
Do you have an example Invoice ID?
Yes, I did a test on my side and it seems like there will be a cancelled PaymentIntent in this case.
I don't have any out-of-band invoice unfortunately. It's jsut that the code checks for it.
I now created one in_0R9n7D6BNHJembTssfeCQ1Mi and apparently the behavior changed as well :/
This was how we detected out of band before:
$isNotRemainingSameAsDue = $invoice->amount_remaining !== $invoice->amount_due;
$isPartlyPaid = $invoice->amount_paid !== 0;
if ($isPartlyPaid || $isNotRemainingSameAsDue) {
throw new Exception(sprintf('Invoice "%s" does not look like paid out of band', $invoice->id));
}
But this doesn't work anymore as it's like this
But as you said the payment intent is canceled
Also there is
Since it's a breaking API version update it's expected that you will need to change some code to handle it
So for the time being I'm using following out-of-band payment detection:
$isPaymentIntentCanceled = $paymentIntent->status === 'canceled';
$isPaymentIntentChargeMissing = $paymentIntent->latest_charge === null;
$isAmoundRemainingZero = $invoice->amount_remaining === 0;
$isAmoundPaidEqualDue = $invoice->amount_paid === $invoice->amount_due;
If all of those are true, it's paid out-of-band
Doh! I was able to create invoice that'S paid out-of-band, but ithas charge ๐