VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: papelari on April 20, 2016, 11:08:42 AM

Title: Virtuemart payment IPN
Post by: papelari on April 20, 2016, 11:08:42 AM
Hello all,

We're developing a payment module for Virtuemart. The module is processed offline but we need to comunicate with out module everytime the client has made a payment (machine 2 machine request).

Whats the best way to capture a URL request on our module?
Title: Re: Virtuemart payment IPN
Post by: jenkinhill on April 20, 2016, 11:11:06 AM
VM payments are managed by plugins, not modules.
Title: Re: Virtuemart payment IPN
Post by: papelari on April 20, 2016, 11:22:35 AM
Quote from: jenkinhill on April 20, 2016, 11:11:06 AM
VM payments are managed by plugins, not modules.
Sorry! I meant plugin. The paying workflow is completed, all that's left is being notified once the client pays.
Title: Re: Virtuemart payment IPN
Post by: GJC Web Design on April 20, 2016, 23:36:58 PM
do u mean TO VM when the payment is made?

It is normally a POST to index.php?option=com_virtuemart&view=vmplg&task=notify&tmpl=component&lang=xx

the POST should contain pm=xx  (the id of the payment method) and the order id etc etc a

so any other factors u want to pass/check

in the payment plug u need  a function plgVmOnPaymentNotification () {

check out the skrill payment plugin in VM

Title: Re: Virtuemart payment IPN
Post by: papelari on April 21, 2016, 13:10:40 PM
Quote from: GJC Web Design on April 20, 2016, 23:36:58 PM
do u mean TO VM when the payment is made?

It is normally a POST to index.php?option=com_virtuemart&view=vmplg&task=notify&tmpl=component&lang=xx

the POST should contain pm=xx  (the id of the payment method) and the order id etc etc a

so any other factors u want to pass/check

in the payment plug u need  a function plgVmOnPaymentNotification () {

check out the skrill payment plugin in VM

Thanks! Any chance in getting this working using a GET request instead of a POST one?

Also, is it normal that I place an echo "string"; and a die(); and I don't see string in the request response?
Title: Re: Virtuemart payment IPN
Post by: GJC Web Design on April 21, 2016, 13:53:22 PM
you can write your plgVmOnPaymentNotification () how ever u want it
Title: Re: Virtuemart payment IPN
Post by: papelari on April 21, 2016, 14:05:20 PM
I'm afraid that the function is being called. When I view the page it shows a white page and when I see the source of the page I get the all the code inside the head tag and:


<body class="contentpane">
<div id="all">
<div id="main">

<div id="system-message-container">
</div>

</div>
</div>
</body>
</html>
Title: Re: Virtuemart payment IPN
Post by: GJC Web Design on April 21, 2016, 16:06:37 PM
I'm sorry.. but this isn't a free coding forum...  the examples are there..  all the payment plugins taht have external notification work the same

If u want to employ me I can code your plugin..

Title: Re: Virtuemart payment IPN
Post by: papelari on April 21, 2016, 17:10:21 PM
I understand.

Meanwhile I've managed to fix the problem, I was declaring the method outside the class.

Thanks for all the help