#yoshinori hisakawa

1 messages · Page 1 of 1 (latest)

inner sealBOT
sage frost
#

Hi there, can you elaborate one the first question? or perhaps you can use an example to explain.

lime solar
#

We are thinking of incorporating it into our e-commerce site.
Before payment is made, check to see if stock exists for the item to be purchased, and if it does, make the payment successful. If not, the transaction will fail.
If not, the payment will fail.

sage frost
#

If I understand you correctly, you want to initiate the payment from backend without customer interaction?

lime solar
#

Here's the image.

sage frost
#

Thanks for the sequence flow. Please note that there's no API to manipulate the payment result, so I'd suggest some changes to your flow.

lime solar
#

Can you be more specific about what kind of flow you are talking about?

sage frost
#

Thanks for waiting, discord is busy today.

lime solar
#

Using paymentintents, we have found a way to generate tokens on the front end and make payments on the back end.
Using this mechanism, it would be possible to insert an inventory confirmation process on the backend before the payment is made.
Are there any recognition discrepancies?

sage frost
#

You should check the inventory first, and only ask the customer for payment if there's stock.

lime solar
#

(4) When the server performs the transaction, it checks the inventory and does not process the payment if the inventory is not available.
Is this correct?