Author Topic: How to make sure plgVmOnPaymentNotification() is fired  (Read 414 times)

ersiranjeevi

  • Beginner
  • *
  • Posts: 3
  • A beginner
How to make sure plgVmOnPaymentNotification() is fired
« on: August 22, 2017, 16:11:18 pm »

Joomla 3.5
Virtuemart 3.2
Hi all - How to make sure plgVmOnPaymentNotification() is fired
We are posting IPN to the cart want to make sure payment response has been received
How do I make sure its received to the cart ?
These are the parameters we are posting
amount=2.35

 cancel_url= ****

 currency=USD

 fee=0.17

 hash=a364283a7989f8817b6de90133f9b3d4

 item_id=Order: ****

 memo=Order: ****

 merchantAccount=***

 notify_url=****

 payerAccount=****

 payerEmail=***@gmail.com

 return_url=****

 status=COMPLETE

 testmode=ON

 tr_id=****

 user1=PKYS029

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 7637
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.2
Re: How to make sure plgVmOnPaymentNotification() is fired
« Reply #1 on: August 23, 2017, 16:58:00 pm »
turn on logging of what ever payment method your directing it at pm=(payment method id)

if no logging then just echo out the function in the payment plugin
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9412
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: How to make sure plgVmOnPaymentNotification() is fired
« Reply #2 on: August 23, 2017, 21:03:35 pm »
For the echo you may use the vmdebug, with echo enabled VmConfig::$echoDebug = 1; or so.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

ersiranjeevi

  • Beginner
  • *
  • Posts: 3
  • A beginner
Re: How to make sure plgVmOnPaymentNotification() is fired
« Reply #3 on: August 23, 2017, 22:14:41 pm »
Thanks, I got it to work, I want to use this stuff here  before updating the order status
$secondary_password = $this->sci_password;
      $pass1 = md5($secondary_password.'s+E_a*');  //encryption for db
      $calchash = MD5($tr_id.":".MD5($pass1).":".$amount.":".$merchantAccount.":".$payerAccount);
Need to get the $secondary_password = $this->sci_password; values  from paymentmodule cofiguration area
Not sure what synatx to be used here to get the values here :(

ersiranjeevi

  • Beginner
  • *
  • Posts: 3
  • A beginner
Re: How to make sure plgVmOnPaymentNotification() is fired
« Reply #4 on: August 30, 2017, 18:15:48 pm »
Any updates guys !!?

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9412
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: How to make sure plgVmOnPaymentNotification() is fired
« Reply #5 on: September 01, 2017, 07:57:50 am »
First, do not use your own encryption. We have a class for that. Except you really need only a md5 and no decoding. I think you try to use the wrong trigger, which is triggered for the email, but not for the update order status itself. There is another trigger for it. onUpdateOrderStatus or so
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/