This redirects to additional pages in this order:
/return/…/custom/order/…/…
/v2/ext/invoice-payment/cancel/system/custom/invoice_id/{orderid}?sbpay_order_id={invoice order id}
/v2/#invoice/pay/{orderid}/return/1
The last page also shows a gives a 404 message (but actually switches to /v2/#error/e403 <=) after getting a 403 from:
/v2/ext/invoice/details/id/{orderid}
Which isn’t surprising, because the order has been removed at this point…? My questions:
As a workaround, can I redirect the user to a custom cancel page instead and follow the redirects server-side to complete cancellation in background?
Can I specify a different target apart from /v2/#invoice/pay/{orderid}/return/1 for the user in another way?
Should I manually try to DELETE the order or will following the cancel_url do that, too?
Similar for the success_url: Is Can I use the same workaround, just return the user to https://custom-domain/thankyou and invoke success_url myself?
Seems you are getting 403 because you opened final page with logged out client. Of course we will not show personal information just by id of order. We do not remove order.
As a workaround, can I redirect the user to a custom cancel page instead and follow the redirects server-side to complete cancellation in background?
Yes, of course you can do this.
Can I specify a different target apart from /v2/#invoice/pay/{orderid}/return/1 for the user in another way?
Unfortunately no.
Should I manually try to DELETE the order or will following the cancel_url do that, too?
Following cancel_url will do that
Similar for the success_url: Is Can I use the same workaround, just return the user to https://custom-domain/thankyou and invoke success_url myself?
Yes you can do this. Just make sure that you call API to confirm payment.
Similar for the success_url: Is Can I use the same workaround, just return the user to https://custom-domain/thankyou and invoke success_url myself?
Yes you can do this. Just make sure that you call API to confirm payment.
How do I manually confirm the payment? Currently after a successful payment I am using:
a) the SBPay.me API with a POST to /api/order/…/approve
b) redirect to return_url
What actions can I use to replace b)?
REST API with PUT /admin/invoices/{id}/accept-payment and { payment_processor: ‘custom’ }?
Is that the same as JSONRpc’s confirmInvoice?
Thank you, I’m nearing completion of my implementation.