Post by artcore » Thu Jul 28, 2016 8:04 pm

I've never seen an order total module with a confirm call.
The checkout confirm step loads the payment method confirm button after which you get redirected to the gateway.
Also, if you want to track a successful payment, the success controller is the only way to do it in.
As for altering core code, there's probably an event trigger in the order model which you can use in a custom module.

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by straightlight » Thu Jul 28, 2016 9:55 pm

I've never seen an order total module with a confirm call.
Well, we all learn something new everyday, don't we? !

Check in the catalog/model/total folder for more information on this. The catalog/model/checkout/order.php file also calls for this method generically. ;D
the success controller is the only way to do it in.
Incorrect. The success controller can stlll be uselessly accessed from the URL bar even though customers don't proceed to an order.
As for altering core code, there's probably an event trigger in the order model which you can use in a custom module.
That is correct and, as mentioned above, this custom module is the confirm / unconfirm method from the order totals. Take note there are payment processing systems that does allow to automatically approved the order upon sending via their APIs which means that the confirmation process can already complete the order before reaching the checkout success page.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by artcore » Thu Jul 28, 2016 10:49 pm

I do learn everyday ;D
I know most order total modules by heart(wrote a couple myself too) and a confirm from checkout is from the payment method. At step 6 that confirm button is ajaxed in from the chosen payment method ;)
You can use order totals modules for checking if a session holds payment and shipping info but that has nothing to do with an actual payment done via a gateway such as PP standard.

And even though the success page can be accessed without being redirected to it, is besides the point. This is where a successful payment is checked as the payment gateway will redirect to it upon...success. Just add logic to check for the correct session vars before they are being unset.
Also, even when a gateway is reporting to the shop about a payment status, without a redirect to the success controller, this cannot be used to hook your own method into, so is not useful to the TS. Unless you're counting on IPN like stuff but that would tie the api curl method to one specific module whereas the success can be used for all.

So IMHumbleO addOrderHistory or session in success page

Still, it's a hot day and I might've missed something, so I don't mind if you prove me wrong 8)

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by straightlight » Thu Jul 28, 2016 10:59 pm

artcore wrote:I do learn everyday ;D
I know most order total modules by heart(wrote a couple myself too) and a confirm from checkout is from the payment method. At step 6 that confirm button is ajaxed in from the chosen payment method ;)
You can use order totals modules for checking if a session holds payment and shipping info but that has nothing to do with an actual payment done via a gateway such as PP standard.

And even though the success page can be accessed without being redirected to it, is besides the point. This is where a successful payment is checked as the payment gateway will redirect to it upon...success. Just add logic to check for the correct session vars before they are being unset.
Also, even when a gateway is reporting to the shop about a payment status, without a redirect to the success controller, this cannot be used to hook your own method into, so is not useful to the TS. Unless you're counting on IPN like stuff but that would tie the api curl method to one specific module whereas the success can be used for all.

So IMHumbleO addOrderHistory or session in success page

Still, it's a hot day and I might've missed something, so I don't mind if you prove me wrong 8)
I think you are misunderstanding the first post request here ... what has been asked is for the poster to know how to separately send an order via a custom URL which does definitely not require to have a separate payment module with cURL to do this.

It is simply possible that you weren't informed of the functionality of the confirm and unconfirm method since, adminitibly writing this, the procedure has not been documented as I now realize how bad it should of had been by the Opencart developers since there seem to be a bit of confusion regarding the analysis this request here.

Let's take a look in the catalog/model/total/credit.php file, for example. As you may notice, the confirm and unconfirm method captures the passed parameters of the $order_info and / or the $order_total which is already among the related payment module since the payment module calls the addOrderHistory method from the catalog/model/checkout/order.php file and even the unconfirm method when needed including the admin API orders that calls the same location in the platform ...

That being said, the first poster here can definitely rely on the confirm method in order to send a forwarded and genuine copy of the order via another URL still over SSL which means, yes, this can definitely be done with an order total module as it is the way Opencart v2.x releases operates from the core out-of-the-box.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by artcore » Thu Jul 28, 2016 11:42 pm

That confirm method is only to add something to the transaction table and is not the checkout confirm which calls the order history.
The coupon order total does something similar.
Myself: I've never seen an order total module with a confirm call.
I should have said an order, checkout confirm button. Not an actual confirm method in a class ;D
Darth Danny: I have an API that I want to process the order information separately. Is it possible to post order information to a custom URL when payment is made
So when a payment is made needs the solutions I gave.

Darn it's hot ;D

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by straightlight » Fri Jul 29, 2016 1:01 am

artcore wrote:That confirm method is only to add something to the transaction table and is not the checkout confirm which calls the order history.
The coupon order total does something similar.
Myself: I've never seen an order total module with a confirm call.
I should have said an order, checkout confirm button. Not an actual confirm method in a class ;D
Darth Danny: I have an API that I want to process the order information separately. Is it possible to post order information to a custom URL when payment is made
So when a payment is made needs the solutions I gave.

Darn it's hot ;D
You do ... realize that this method can be customized by distributions right? A developer could simply add his own codes into his own order total module and customize both methods, confirm and unconfirm as he please. The order total insert into statement, in this case, would be for the credit module as I demonstrated as an example but does not despite the fact on being customized otherwise by using our own order total module which is the point on why ... Opencart allows the use of extensions so there could be countless ways to personalize a method ...

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by artcore » Fri Jul 29, 2016 2:27 am

All true, but it's still not the spot to get a successful transaction callback.
Ordering products (where the order totals are populated) is like you're driving the car. We need the custom function where you actually reached the destination, iow paid, ordered

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by straightlight » Fri Jul 29, 2016 2:35 am

artcore wrote:All true, but it's still not the spot to get a successful transaction callback.
Ordering products (where the order totals are populated) is like you're driving the car. We need the custom function where you actually reached the destination, iow paid, ordered
Which in this case is about a custom URL, not a callback transaction.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by artcore » Fri Jul 29, 2016 4:41 am

This thread seems to have missing posts including the topic starter...

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by straightlight » Fri Jul 29, 2016 5:13 am

artcore wrote:This thread seems to have missing posts including the topic starter...
Not on this topic, the posts has been split.

Dedication and passion goes to those who are able to push and merge a project.

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 4 guests