Payment gateway

I am integrating one of the payment gateways into my site in PHP. Before continuing, as I am new to this, I have some doubts (use cases / scenarios). So I need a solution to solve these scenarios. I have listed them here.

1) . How to transfer a unique identifier for a payment gateway, while it treats it as order No., but in a real scenario. NO / ID of the order will be generated only upon successful transaction. I was thinking of sending a random number to the payment gateway. With a successful transaction, I can store it in the Order table.

Table: Order

1) aID: (unique, primary, AI)

2) RandomNo (unique)

3) Order Date

This is a good idea.

2) What identifier should be displayed to the user. ORDER ID either aID or RandomNO

3) Do I need to save the response from the payment gateway to the database, for example, payment ID (unique), Reply code, OrderNO and Amount. How it will be useful.

4) What are the possible scenarios that may arise after the integration of the payment gateway and how to solve them

+3
source share
1 answer

1) How to pass a unique identifier to a payment gateway, while it treats it as a No order, but in a real scenario, an NO / ID order will be created only upon a successful transaction. I was thinking of sending a random number to the payment gateway. With a successful transaction, I can store it in the Order table.

ANS. , .

2) . ORDER aID RandomNO

ANS. , , .

3) , , ID (), , OrderNO Amount. .

ANS: ! , , - .

4) ,

ANS . I did not ask you this question.

+6
source

All Articles