Now I am wondering if there is a way to make an order go from new to completed automatically. The amazon fps auth expires in 3 hours, so if an order comes in after hours we are not able to claim acquire it in the morning.
What is the best way to handle this?
On a side note, the Paypal provider automatically acquires. Why is this handled differently?
There's some legacy in it. Some times your'e not allowed to take the money before the order is shipped - if your'e selling Materials. However if they're immaterial like software, codes for something or whatever - you can acquired the money instant. If there's no way of acquireing payment instant with Amazon (check the documentation if you can flag off instant acquire at the link below)
Another way is to check the status of the payment on OrderConfirmation. If the payment has authorized status you can just use the OrderService to take it to completed. (The same as using the UI in the backend).
Also, I have discovered in the log that everywhere the PaymentProcessor.axd is called there is an exception immediatley after. Is this and indicator that it is trying to acquire but there is an issue?
2013-06-09 10:50:36,465 [71] INFO umbraco.BusinessLogic.Log - [Thread 18] Redirected log call (please use Umbraco.Core.Logging.LogHelper instead of umbraco.BusinessLogic.Log) | Type: Error | User: 0 | NodeId: -1 | Comment: http://xxx.com:80/8/PaymentProcessor.axd?[removed]
2013-06-09 10:50:36,465 [71] INFO umbraco.BusinessLogic.Log - [Thread 18] Redirected log call (please use Umbraco.Core.Logging.LogHelper instead of umbraco.BusinessLogic.Log) | Type: Error | User: 0 | NodeId: -1 | Comment: Thread was being aborted.
Void AbortInternal()
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.AbortCurrentThread()
at System.Web.HttpResponse.End()
at System.Web.HttpResponse.Redirect(String url, Boolean endResponse, Boolean permanent)
at UCommerce.Transactions.Payments.Amazon.AmazonPaymentMethodService.ProcessCallback(Payment payment)
at UCommerce.Transactions.Payments.PaymentProcessor.ProcessRequest(HttpContext context)
So in my callback confirmation page I add the code you listed to change the status and kickoff the acquisition.
The strange thing about the exception I listed from the PaymentProcessor is that this is the page Amazon calls when the order is confirmed by the user.
I assume this is preventing the ToCompleted pipeline from working or am I misunderstanding the process here?
The only issues I have seen so far in the audit log are when the authorization expires and I try to move to completed, there is an "Internal Error" and it moves to the Requires Attention queue.
Every payment provider redirects to PaymentProcessor which then is responsible for sending the customer to the desired URL of your's. ToCompleted is out of the box never called unless you do it (either from the backend or through the API).
Okay. The last issue is natural i guess :) We cannot do anything about this. Howver doing the two lines of cods that i listed should do the trick.
automatically take order from new to completed
In my previous post you helped me get the amazon payments working.
http://our.umbraco.org/projects/website-utilities/ucommerce/ucommerce-support/41595-Amazon-payment-provider-not-working
Now I am wondering if there is a way to make an order go from new to completed automatically. The amazon fps auth expires in 3 hours, so if an order comes in after hours we are not able to claim acquire it in the morning.
What is the best way to handle this?
On a side note, the Paypal provider automatically acquires. Why is this handled differently?
Thanks
There's some legacy in it. Some times your'e not allowed to take the money before the order is shipped - if your'e selling Materials. However if they're immaterial like software, codes for something or whatever - you can acquired the money instant. If there's no way of acquireing payment instant with Amazon (check the documentation if you can flag off instant acquire at the link below)
http://www.publicvoid.dk/SetupUCommerceToIncludeAmazonFPSAsAPaymentMethod.aspx
Another way is to check the status of the payment on OrderConfirmation. If the payment has authorized status you can just use the OrderService to take it to completed. (The same as using the UI in the backend).
Regards
Morten
Thanks Morten,
I did follow the link you provided for my initial setup. I have enabled Auto Acquire per the last section in the article.
Could you point me to more info on using the OrderService to take it to completed?
Thanks
Also, I have discovered in the log that everywhere the PaymentProcessor.axd is called there is an exception immediatley after. Is this and indicator that it is trying to acquire but there is an issue?
2013-06-09 10:50:36,465 [71] INFO umbraco.BusinessLogic.Log - [Thread 18] Redirected log call (please use Umbraco.Core.Logging.LogHelper instead of umbraco.BusinessLogic.Log) | Type: Error | User: 0 | NodeId: -1 | Comment: http://xxx.com:80/8/PaymentProcessor.axd?[removed]
2013-06-09 10:50:36,465 [71] INFO umbraco.BusinessLogic.Log - [Thread 18] Redirected log call (please use Umbraco.Core.Logging.LogHelper instead of umbraco.BusinessLogic.Log) | Type: Error | User: 0 | NodeId: -1 | Comment: Thread was being aborted.
Void AbortInternal()
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.AbortCurrentThread()
at System.Web.HttpResponse.End()
at System.Web.HttpResponse.Redirect(String url, Boolean endResponse, Boolean permanent)
at UCommerce.Transactions.Payments.Amazon.AmazonPaymentMethodService.ProcessCallback(Payment payment)
at UCommerce.Transactions.Payments.PaymentProcessor.ProcessRequest(HttpContext context)
Yeah, the following code could do it. Just place it on your orderconfirmation page if you want the order to be acquired right away.
If there's an issue acquireing it would be revealed in the order audit.
Thanks Morten, I think I am getting the picture.
So in my callback confirmation page I add the code you listed to change the status and kickoff the acquisition.
The strange thing about the exception I listed from the PaymentProcessor is that this is the page Amazon calls when the order is confirmed by the user.
I assume this is preventing the ToCompleted pipeline from working or am I misunderstanding the process here?
The only issues I have seen so far in the audit log are when the authorization expires and I try to move to completed, there is an "Internal Error" and it moves to the Requires Attention queue.
Every payment provider redirects to PaymentProcessor which then is responsible for sending the customer to the desired URL of your's. ToCompleted is out of the box never called unless you do it (either from the backend or through the API).
Okay. The last issue is natural i guess :) We cannot do anything about this. Howver doing the two lines of cods that i listed should do the trick.
is working on a reply...