Hit a url after payment status confirmed

  • Posts: 3
  • Thank you received: 0
9 years 2 months ago #213550

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 2.5.27
-- PHP version -- : 5.4.4

Hello,

I need to hit a url after payment is confirmed, i am using paypal for payment.
I have created a payment plugin and using method 'onAfterOrderConfirm' but this method is not working even order is confirmed and payment done.
I have attached plugin main file 'dt_hikashop.php'.
Please help me to shortout this.

Thanks.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
9 years 2 months ago #213559

Hello,

I need to hit a url after payment is confirmed

Generally, we use the "onPaymentNotification" function to do the treatment after the payment is done. So after their payment, your customers will have to be redirected to an URL which will call that function.

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
9 years 2 months ago #213663

Thanks for the quick reply.

I need to append order data in URL like invoice=112&mc_gross=-15.00&item_number1=&item_number2=Tek.... that will received from paypal after payment.
So how i can get return paypal data for an order in "onPaymentNotification" function.

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
9 years 2 months ago #213680

Hello,
Using this kind of URL will do the job :

HIKASHOP_LIVE . 'index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=YOURPAYMENTMETHODNAME&tmpl=component&ORDER_DATA
HIKASHOP_LIVE is just a constant containing your website address.

YOURPAYMENTMETHODNAME : don't forget to replace it by your payment plugin name.

ORDER_DATA : your order data

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
9 years 2 months ago #213798

Hello,

Thanks for your advise but i would like to know some other things.

Let me explain, Actually when we process any order then after making the payment through the PayPal, The paypal returns some data after successful payment, I need to append that data (Which we got from pay-pal after successful payment)as i have already mentioned above.

As per your suggestion, i need to use "onPaymentNotification" for hitting the URL after confirm payment but i want to know how i can access return pay-pal data here so i can append the desired data in to the URL. Please advise.

Many thanks in advance.

Please Log in or Create an account to join the conversation.

  • Posts: 82909
  • Thank you received: 13379
  • MODERATOR
9 years 2 months ago #213815

Hi,

You can access the data in the PHP variable $_REQUEST in that function.

Please Log in or Create an account to join the conversation.

Time to create page: 0.073 seconds
Powered by Kunena Forum