News:

Support the VirtueMart project and become a member

Main Menu

Payment plugin

Started by andrecoolguy, February 14, 2018, 06:59:00 AM

Previous topic - Next topic

andrecoolguy

hey there,
I'm making a new payment plugin for virtuemart 3.x and stuck on duplicating orders on each time confirm purchase button click if payment error, or payment is not enough.
I can't find 'event' or 'method' to check payment before confirm purchase button click. I search forum but has no luck. Any suggestion would be very helpful.

Jörgen

If You mean the following. A payment does not get confirmed and You get a pending order. Afaik know is this behaviour not possible to circumvent today, Paypal for example does the exact same thing. The order is first created and then the payment gets checked.

I do not know of any way to get around this withot making Your own payment check to some payment processors API. I know of payment plugins that check the customers address Before payment is checked and order is created, but not where payment check is done Before order Creation.

best regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

andrecoolguy

@Jörgen It could be after order created, so then I need to be able to set statuses to order which already created. Simply grab order with order_id from session for example. Then when I do redirect back to cart if payment failed, it generated new order on 'confirm purchase' button click. I guess I need to redirect to somewhere else? Or do I need to remove newly created order?

Jörgen

Have You checked the paypal or sofort ideal plugin? They give a good understanding of what triggers and functions to create and use in the plugin.

Jörgen @ Kreativ Fotografi

Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Studio 42

When you use external paiment, a pending order is created, in case the user do not return to the shop after paiement.
Some other paiment check by ajax on confirm, so you dont need this pending order.
Check standard paiement for eg.