Everything seems to be correct, and the payment process completes, and returns to my site.
In the order shipping tab, I see the payment status set to authorized, and a reference number of Reference-76. Which based on the browser url in the call to PaymentProcessor.axd the the reference-76 is coming from Amazon.
The issue is that when I look in the amazon payments portal, there are not transactions.
The response from Amazon is:
"The workflow of FPS is this: when the buyer finish the checkout process, the return URL will contain an authorized payment token and a reference ID, which you will need when you charge against the token. The website will then need to programmingly charge the token by calling the "pay" API against the token.
**With those information in mind, I suggest you to go to the uCommerce's configuration panel to see if there's anyway you can manually "Collect Payment". You might be able to make it so that the website charges the token automatically upon getting it or upon certain conditions being met(fixed time, customer confirmation, etc) I ran into this page on the Internet that might be helpful, checkout the bottom of the page where they show you how to configure "Auto Acquire" payments: http://www.publicvoid.dk/SetupUCommerceToIncludeAmazonFPSAsAPaymentMethod.aspx"
By default uCommerce only authorizes credit cards and captures money once items are ready to be shipped. To support this scenario you need to enable the "Acquire payment" task in the ToCompleted pipeline (in /umbraco/ucommerce/pipelines) and move your order from "New Order" to "Completed Order" state.
The payments doesn't show up in the Amazon FPS UI, before the payments are captured.
You can capture the payments from the uCommerce backend, by changing order status from new order to completed order.
Before changing the order status in uCommerce, you need to add the "AcquirePaymentTask" pipeline task, in the "ToCompletedOrder.config" pipeline configuration file. The task should already be present in the file, you just need to ucomment the "<value>${ToCompletedOrder.AcquirePaymentTask}</value>" part.
The "Unexpected callback from Amazon FPS" error happens when uCommerce receives a callback from Amazon that it doesn't understand, like if you do a manual refund from Amazon.
Amazon payment provider not working
Thanks Soren, I did figure out that the state change is what it took to finalize the transaction.
However I do have acquire payment enabled and that is not working.
Are you getting any errors in the log or in the Audit Trail tab?
Nothing in the audit trail tab. I have not yet found the log, sorry to ask but where is it?
I am hosting on azure websites fyi.
I found the log file in app_data, but its open so I cannot download it with ftp.
There are a few errors around the paymentprocesor.axd, here are a few of them, I can send you the full log file if its easier:
2013-06-06 21:21:27,332 [18] INFO umbraco.BusinessLogic.Log - [Thread 26] Redirected log call (please use Umbraco.Core.Logging.LogHelper instead of umbraco.BusinessLogic.Log) | Type: Error | User: 0 | NodeId: -1 | Comment: Could not find a payment with 'callerReference': 123.
UCommerce.EntitiesV2.Payment Extract(System.Web.HttpRequest)
at UCommerce.Transactions.Payments.Amazon.AmazonHttpPaymentExtractor.Extract(HttpRequest httpRequest)
at UCommerce.Transactions.Payments.Amazon.AmazonPaymentMethodService.Extract(HttpRequest httpRequest)
at UCommerce.Transactions.Payments.GenericPaymentHandler.Execute(HttpContext context, IPaymentWindow& paymentWindow, Payment& payment)
at UCommerce.Transactions.Payments.PaymentProcessor.ProcessRequest(HttpContext context)
2013-06-06 21:22:10,777 [18] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 24] An unhandled exception occurred
System.InvalidOperationException: Unexpected callback from Amazon FPS.
at UCommerce.Transactions.Payments.Amazon.AmazonPaymentMethodService.ProcessCallback(Payment payment)
at UCommerce.Transactions.Payments.PaymentProcessor.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
2013-06-06 21:22:10,777 [18] INFO umbraco.BusinessLogic.Log - [Thread 11] Redirected log call (please use Umbraco.Core.Logging.LogHelper instead of umbraco.BusinessLogic.Log) | Type: Error | User: 0 | NodeId: -1 | Comment: http://www.ecgcheck.com:80/8/PaymentProcessor.axd?callerReference=Reference-74
2013-06-06 21:22:10,777 [18] INFO umbraco.BusinessLogic.Log - [Thread 11] Redirected log call (please use Umbraco.Core.Logging.LogHelper instead of umbraco.BusinessLogic.Log) | Type: Error | User: 0 | NodeId: -1 | Comment: Unexpected callback from Amazon FPS.
Void ProcessCallback(UCommerce.EntitiesV2.Payment)
at UCommerce.Transactions.Payments.Amazon.AmazonPaymentMethodService.ProcessCallback(Payment payment)
at UCommerce.Transactions.Payments.PaymentProcessor.ProcessRequest(HttpContext context)
2013-06-06 22:59:39,944 [8] INFO umbraco.BusinessLogic.Log - [Thread 19] Redirected log call (please use Umbraco.Core.Logging.LogHelper instead of umbraco.BusinessLogic.Log) | Type: Error | User: 0 | NodeId: -1 | Comment: http://www.ecgcheck.com:80/8/PaymentProcessor.axd
2013-06-06 22:59:39,960 [8] INFO umbraco.BusinessLogic.Log - [Thread 21] Redirected log call (please use Umbraco.Core.Logging.LogHelper instead of umbraco.BusinessLogic.Log) | Type: Error | User: 0 | NodeId: -1 | Comment: Batch update returned unexpected row count from update; actual row count: 0; expected: 1
Void Intercept(Castle.DynamicProxy.IInvocation)
at NHibernate.AdoNet.Expectations.VerifyOutcomeBatched(Int32 expectedRowCount, Int32 rowCount)
at NHibernate.AdoNet.SqlClientBatchingBatcher.DoExecuteBatch(IDbCommand ps)
at NHibernate.AdoNet.AbstractBatcher.ExecuteBatchWithTiming(IDbCommand ps)
at NHibernate.AdoNet.AbstractBatcher.ExecuteBatch()
at NHibernate.Engine.ActionQueue.ExecuteActions(IList list)
at NHibernate.Engine.ActionQueue.ExecuteActions()
at NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session)
at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event)
at NHibernate.Impl.SessionImpl.Flush()
at UCommerce.EntitiesV2.Repository`1.Save(T entity)
at UCommerce.EntitiesV2.PurchaseOrder.Save()
at NHibernate.ByteCode.Castle.LazyInitializer.Intercept(IInvocation invocation)
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Castle.Proxies.PurchaseOrderProxy.Save()
at UCommerce.Transactions.Payments.Amazon.AmazonPaymentMethodService.HandleRefundCallbackOperation(HttpRequest httpRequest, Payment payment)
at UCommerce.Transactions.Payments.Amazon.AmazonPaymentMethodService.ProcessCallback(Payment payment)
at UCommerce.Transactions.Payments.PaymentProcessor.ProcessRequest(HttpContext context)
2013-06-06 22:59:39,960 [8] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 16] An unhandled exception occurred
NHibernate.StaleStateException: Batch update returned unexpected row count from update; actual row count: 0; expected: 1
at NHibernate.AdoNet.Expectations.VerifyOutcomeBatched(Int32 expectedRowCount, Int32 rowCount)
at NHibernate.AdoNet.SqlClientBatchingBatcher.DoExecuteBatch(IDbCommand ps)
at NHibernate.AdoNet.AbstractBatcher.ExecuteBatchWithTiming(IDbCommand ps)
at NHibernate.AdoNet.AbstractBatcher.ExecuteBatch()
at NHibernate.Engine.ActionQueue.ExecuteActions(IList list)
at NHibernate.Engine.ActionQueue.ExecuteActions()
at NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session)
at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event)
at NHibernate.Impl.SessionImpl.Flush()
at UCommerce.EntitiesV2.Repository`1.Save(T entity)
at UCommerce.EntitiesV2.PurchaseOrder.Save()
at NHibernate.ByteCode.Castle.LazyInitializer.Intercept(IInvocation invocation)
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Castle.Proxies.PurchaseOrderProxy.Save()
at UCommerce.Transactions.Payments.Amazon.AmazonPaymentMethodService.HandleRefundCallbackOperation(HttpRequest httpRequest, Payment payment)
at UCommerce.Transactions.Payments.Amazon.AmazonPaymentMethodService.ProcessCallback(Payment payment)
at UCommerce.Transactions.Payments.PaymentProcessor.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Also, now that I can complete the transaction manually, I have some transactions which are moved to "Requires Attention"
Do the authorizations expire? These orders are about a week old.
Here is the audit log:
Completed order => Requires attention
Hi Bill,
The payments doesn't show up in the Amazon FPS UI, before the payments are captured.
You can capture the payments from the uCommerce backend, by changing order status from new order to completed order.
Before changing the order status in uCommerce, you need to add the "AcquirePaymentTask" pipeline task, in the "ToCompletedOrder.config" pipeline configuration file. The task should already be present in the file, you just need to ucomment the "<value>${ToCompletedOrder.AcquirePaymentTask}</value>" part.
The "Unexpected callback from Amazon FPS" error happens when uCommerce receives a callback from Amazon that it doesn't understand, like if you do a manual refund from Amazon.
Hope that helps,
Lars Horne-Mortensen
Thanks Lars,
The pipeline task has been un-commented however acquire is not happening.
Have you tried to do an IIS reset? Just run iisreset.exe in administrator mode.
The pipeline configurations doesn't get updated before the IIS is reset.
is working on a reply...