Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the order placed before finish payment #5

Open
moamen-ui opened this issue Jul 22, 2018 · 4 comments
Open

the order placed before finish payment #5

moamen-ui opened this issue Jul 22, 2018 · 4 comments

Comments

@moamen-ui
Copy link

Magento 2.2.3

When chose Payfort as payment:
Result => the order placed before I type the credit card details and order status is Pending.
Expected => the order should be place after Payfort confirm the payment.

@malikabid
Copy link

Dear @moamen-ui
It is the default behaviour of any payment gateway to place order before redirecting to gateway page.
They need a merchant reference to show in the transactions which is order id of merchant website.
The flow is create order as "new" or "pending" and once the payment is done, it changes status to "confirmed" or "processed"

@altafhussain10
Copy link

@malikabid it is not entirely true about the payment gateways to redirect to gateway page before placing an order. The limitation is actually coming from Payfort itself.

I am facing the same issue and I did a lot of research about it and found that Magento has this capability. The default Magento Braintree payment module is using the same way of Authorize, then place order and then capture the payment.

Magneto provides a set of tools for this feature and it is called Gateway Command Pools. Magento provides a set of commands like Authorize, Sale, Capture, Refund, Cancel etc. For the payment workflow of Authorize, Sale and then Capture we need to have an API for Authorize as it is not possible to have a redirection to Payfort authorization page if you need to authorize payment before placing an order.

Payfort is providing API for Capture (Purchase) and if Payfort provides APIs for Authorization, then this issue can be fixed easily at the customer side.

Regarding the merchant reference, according to the documentation, we can use any unique value for this purpose, and it can be handled easily even before placing the order. According to payfort in merchant reference, we can pass fort ID also which is received in Authorization process.

I hope Payfort will soon provide an API for Authorization.

@smoizs
Copy link

smoizs commented Dec 10, 2018

Payfort has a Authorization API already - it always has. However, the payfort Authorization API too needs merchant ref number, hence logically there has to be a order placed with pending status. Using custom order status, you could also set the status to "payment pending"

@malikabid
Copy link

malikabid commented Dec 12, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants