VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: t68 on December 30, 2014, 15:55:43 PM

Title: Payson payment plugin not setting order status correct
Post by: t68 on December 30, 2014, 15:55:43 PM
Hi!
I use Paypal and Payson payment plugins in our VM. Paypal works fine but Payson fails to set order status correct. Whatever happens after being redirected to he payson gateway upon confirming order in VM, the order status is set to "confirmed". In the Payson module settings in VM there are two order status options. One is for successful transaction which I have set to "confirmed". The other is for Failed transactions which I have set to "cancelled".

If I cancel an order in the Payson gateway it sends me back to the VM-page with  this url:
http://nnnnnnnnn.se/index.php?option=com_virtuemart&view=pluginresponse&task=pluginUserPaymentCancel&on=xxx&TOKEN=long_string_here_from_payson
(I've replaced w some text where nnnnnnn=url and xxx=payson order no)
I dont know is there is a problem here or if there is some api communication in the background that is problematic.

If I cancel a Paypal order the same way it returns a slightly different url:
http://nnnnnnnnn.se/index.php?option=com_virtuemart&view=pluginresponse&task=pluginUserPaymentCancel&on=yyyyyyyy&pm=1&Itemid=257&lang=
Here yyyyy is the VM order number.

The plugin is said to be working up to VM2.6.8 but our VM is on 2.6.12.2 and J2.528. Can this be the issue?
Thanks for any help solving this.






Title: Re: Payson payment plugin not setting order status correct
Post by: GJC Web Design on December 30, 2014, 16:09:25 PM
To me it hard to see how the cancel at least can work

the pm= is the payment method id - even if it gets back to the payson payment method  plgVmOnUserPaymentCancel() function how would it know that it is the intended payment method as the pm isn't passed?

Unless it is encrypted in the TOKEN etc

but without the plugin to look at very difficult to advise - but it seems differently coded in this respect from the normal way the payment plugins are...
Title: Re: Payson payment plugin not setting order status correct
Post by: t68 on December 31, 2014, 11:59:38 AM
Thanks for your response GJC!
I've asked Payson support to look into this too of course.
But if you want to check the plugin out its here:
https://www.payson.se/integration/moduler/virtuemart

Skickat från min HTC One via Tapatalk

Title: Re: Payson payment plugin not setting order status correct
Post by: GJC Web Design on December 31, 2014, 12:44:16 PM
had a quick look .. the function for cancel does nothing afaiks

function plgVmOnUserPaymentCancel() {
        if (!class_exists('VirtueMartModelOrders')) {
            require(JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php');
        }
    }

that's it - compare for example to the Paypal function plgVmOnUserPaymentCancel()
Title: Re: Payson payment plugin not setting order status correct
Post by: t68 on December 31, 2014, 14:06:00 PM
Thank´s for finding this out! In which file should I look for and try to fix this (or at least point the Payson guys in that direction)?
Title: Re: Payson payment plugin not setting order status correct
Post by: GJC Web Design on December 31, 2014, 14:31:42 PM
there is only one file -> paysondirect.php