payment plugin without redirection

  • Posts: 26
  • Thank you received: 0
8 years 7 months ago #237406

-- HikaShop version -- : 2.6.2
-- Joomla version -- : 3.4.8

Hi ,
I am developing a payment plugin that performs RESTful API calls , (payment is handled within the same page).
I have learned that Order status will change to (confirmed) when the payment notification url is used, but I don't have this at all in my plugin (due to the fact that it doesn't use a redirection)
so I want a manual approach to change the order status (and thus, have the confirmation email sent) , I tried to call the modifyOrder function with 'confirmed' status, but it doesn't change at all, it remains in the 'created' state
any help on how to force the order status update?

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
8 years 7 months ago #237407

Hi,

You can look at the PayPal Pro payment plugin for an example of that. It sends a call to the API in the onBeforeOrderCreate trigger and directly confirms the order in the onAfterOrderCreate function with the modifyOrder function.

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

  • Posts: 26
  • Thank you received: 0
8 years 7 months ago #237567

nicolas wrote: Hi,

You can look at the PayPal Pro payment plugin for an example of that. It sends a call to the API in the onBeforeOrderCreate trigger and directly confirms the order in the onAfterOrderCreate function with the modifyOrder function.

Thanks for reply,
it actually didn't solve my problem, the order status is still 'created' not 'confirmed'
I have followed PaypalPro flow, in onBeforeOrderCreate I am sending the API request and validating the result, and in onAfterOrderCreate, I am configuring the email(the same of PayPal Pro) and modifying the order with the same call (modifyOrder)
but with no help, I even tried activating PayPal Pro (after little modification to allow null payments) the order is also hanging in the created state

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
8 years 7 months ago #237575

Hi,

Well, I can only think of a problem in your code or in the settings of the Order section of the HikaShop configuration or the settings page of your payment plugin.

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

  • Posts: 26
  • Thank you received: 0
8 years 7 months ago #237652

thank you, my problem is solved,
I was not calling modifyOrder in "onBeforeOrderCreate" method, I was only calling it after the order is created,

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

Time to create page: 0.058 seconds
Powered by Kunena Forum