News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Virtuemart payment IPN

Started by papelari, April 20, 2016, 11:08:42 AM

Previous topic - Next topic

papelari

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?

jenkinhill

VM payments are managed by plugins, not modules.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

papelari

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.

GJC Web Design

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

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

papelari

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?

GJC Web Design

you can write your plgVmOnPaymentNotification () how ever u want it
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

papelari

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>

GJC Web Design

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..

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

papelari

I understand.

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

Thanks for all the help