Post by ofzswi » Fri Oct 23, 2020 1:28 am

Hello together
I've searched in the Forum and found some Helfupl Topics.

My Store is OC 2.0.3.1. We're using different Payment Plugins. One Plugin is working with Webhooks. It inserts the order when we receive a Webhook that payment is confirmed (in this case order is created) and another webhook, mostly 1-3 seconds after 1.st webhook, the final hook that say payment received.
Other Methods are working directly, that Order Status is added.

We're working now with a Cron to check paid orders with Status (payment received).
Now we would like to do that directly by an order.

My developers says, it is not good to fire the Script in the success.php File before clearing Data, because if customer leaves the Success Page, it will stop the Script.
This script will make API calls to get Information which will displayed directly on the success page.

Do you have any Ideas how to deal with this?
My Idea was to check whenever an OrderStatus is added to check if it's the payment Status to fire the Script. But Unfortunately this Payment Module uses an own AddOrderHistory Call.

It should not break the script on success page, if customer leaves page or reload it or lose connection.
The other Problem is, the time different between webhooks, it can be 1 seconds or also up top 10 seconds.
We can't use JAVA on our Hosting.

Any Idea's?

Newbie

Posts

Joined
Fri Oct 23, 2020 1:19 am

Post by straightlight » Wed Oct 28, 2020 7:37 am

My developers says, it is not good to fire the Script in the success.php File before clearing Data, because if customer leaves the Success Page, it will stop the Script.
This script will make API calls to get Information which will displayed directly on the success page.
Your developer would be correct. Using such an old OC version may create higher Business impacts to your sales. Upgrading your store to OC v3.x releases allows developers to create events by trigger controllers implicitly which does not require to alter any core files to accomplish what you need. The Order History can be called either with /before or /after as an event when using the APIs.

Followed is the documentation on how to proceed with the order statuses: https://github.com/opencart/opencart/wiki/Events-System .

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ofzswi » Wed Oct 28, 2020 3:20 pm

straightlight wrote:
Wed Oct 28, 2020 7:37 am
My developers says, it is not good to fire the Script in the success.php File before clearing Data, because if customer leaves the Success Page, it will stop the Script.
This script will make API calls to get Information which will displayed directly on the success page.
Your developer would be correct. Using such an old OC version may create higher Business impacts to your sales. Upgrading your store to OC v3.x releases allows developers to create events by trigger controllers implicitly which does not require to alter any core files to accomplish what you need. The Order History can be called either with /before or /after as an event when using the APIs.

Followed is the documentation on how to proceed with the order statuses: https://github.com/opencart/opencart/wiki/Events-System .
Okay thanks. But unfortunately, we can't updated it right now. If we would do that, we would sure take another Software (like Magento) which has a lot of more Functions. I readed about that Events, but not only good things.
I don't know if it is not possible in our current Version with a vqmod ? Or why should that not work ?
The Problem is also a Payment Method. They don't use the default Order History Adding Call, they have an own one.

Newbie

Posts

Joined
Fri Oct 23, 2020 1:19 am

Post by straightlight » Wed Oct 28, 2020 7:15 pm

ofzswi wrote:
Wed Oct 28, 2020 3:20 pm
Okay thanks. But unfortunately, we can't updated it right now. If we would do that, we would sure take another Software (like Magento) which has a lot of more Functions. I readed about that Events, but not only good things.
Your lost.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ofzswi » Wed Oct 28, 2020 7:21 pm

straightlight wrote:
Wed Oct 28, 2020 7:15 pm
ofzswi wrote:
Wed Oct 28, 2020 3:20 pm
Okay thanks. But unfortunately, we can't updated it right now. If we would do that, we would sure take another Software (like Magento) which has a lot of more Functions. I readed about that Events, but not only good things.
Your lost.
I bet you're also such a Developer who can't create good functional Modules. I've saw those many times. Updated a Module, nothing is working longer.
Only had Problems with Updating. The Fact that you offend me, is also a hint.

Newbie

Posts

Joined
Fri Oct 23, 2020 1:19 am

Post by straightlight » Wed Oct 28, 2020 7:24 pm

ofzswi wrote:
Wed Oct 28, 2020 7:21 pm
straightlight wrote:
Wed Oct 28, 2020 7:15 pm
ofzswi wrote:
Wed Oct 28, 2020 3:20 pm
Okay thanks. But unfortunately, we can't updated it right now. If we would do that, we would sure take another Software (like Magento) which has a lot of more Functions. I readed about that Events, but not only good things.
Your lost.
I bet you're also such a Developer who can't create good functional Modules. I've saw those many times. Updated a Module, nothing is working longer.
Only had Problems with Updating.
On older OC versions, I wouldn't doubt it. Which is why, as a developer, I don't support older OC versions but only recent ones. By upgrading your store, you'd be using a more recent version of the platform as you wouldn't address your concern regarding the lack of support good extension developers may provide since all buyers on the Marketplace, or originating from third party websites, are already encouraged to contact the extension developers prior to purchase the goods as this has been explained many times on the forum since ages.

Therefore, since you have mentioned you would not upgrade your store and provide such replies, it is still under your responsibility to ensure security on your store and on your domain are both imminent and that includes the extensions you may decide to purchase or have already purchased in the past.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 6 guests