I am trying to capture a paypal refund back in to ucommerce to update the status. I can see that the IPN message is being sent to the correct url and /8/56/PaymentProcessor.axd has a 200 code in the log files, but nothing is being triggered within uCommerce.
I thought this would trigger the ToCancelled Pipeline as per the paypal setup instructions. I have uncommented the task in the ToCancelled.Config
<value>${ToCancelled.CancelPaymentTask}</value>
Is there something else I need to implement for the refund?
Yes I have tried that. The payment complete messages are coming through from paypal to checkout the orders, it just seems as though the Refund action is not attached to anything. Worst case I'll have to override the response class but I thought that the refunds were supposed to be received automatically.
I'm sure that it is supposed to refund when you cancel a order. I will try to see if I can find anything that can explain why it doesn't trigger the cancel payment.
Edit:
Silly question - Before you cancel a payment have you checked that the money has been aquired?
Hi, my Payments are going straight to Authorised - as its a SALE transaction. The payment status is marked as Completed in PayPal. I click the refind button and then check the IPN history. The message has been sent and below is the slighty edited IPN message.
Refunds should be issue from uCommerce rather than PayPal. The idea is to keep order processing in uCommerce so you never have to log into PayPal. The ToCancelled pipeline has the refund task (it needs to be enabled by commenting it in).
The idea is that when an order is moved from new or completed status uCommerce will void or refund depending on what the starting point is.
Hi, ok I see - When I click this for a PayPal Direct Payment - My custom payment provider - the order moves to requires attention. I assume I have to write my own code to handle that. However on a paypal order I get and error below.
Error message
System.InvalidCastException: Unable to cast object of type 'PayPal.Manager.SDKConfigHandler' to type 'System.Xml.XmlNode'.
Stack trace
[InvalidCastException: Unable to cast object of type 'PayPal.Manager.SDKConfigHandler' to type 'System.Xml.XmlNode'.] at com.paypal.sdk.core.Config..ctor() at com.paypal.sdk.core.Config.get_Instance() at com.paypal.sdk.core.APICallerBase.SetTrustManager() at com.paypal.sdk.core.nvp.NVPAPICaller..ctor() at com.paypal.sdk.services.NVPCallerServices.Initialize() at UCommerce.Transactions.Payments.PayPal.PayPalPaymentMethodService.GetPayPalNVPCaller() at UCommerce.Transactions.Payments.PayPal.PayPalPaymentMethodService.CancelPaymentInternal(Payment\ payment, String& status) at UCommerce.Transactions.Payments.ExternalPaymentMethodService.CancelPayment(Payment\ paymentToCancel) at UCommerce.Pipelines.OrderProcessing.CancelPaymentTask.Execute(PurchaseOrder\ purchaseOrder) at UCommerce.Pipelines.Pipeline`1.Execute(T subject)
[PipelineException: Exception occoured while processing pipeline 'UCommerce.Pipelines.OrderProcessing.OrderProcessingPipeline'. See inner exception for details.] at UCommerce.Pipelines.Pipeline`1.Execute(T subject) at UCommerce.Transactions.OrderService.ChangeOrderStatus(PurchaseOrder purchaseOrder,\ OrderStatus newOrderStatus, String userName) at UCommerce.Web.UI.Orders.ChangeOrderStatus.SaveOrderStatus() at UCommerce.Web.UI.Orders.ChangeOrderStatus.SaveButton_Clicked(Object sender,\ EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,\ Boolean includeStagesAfterAsyncPoint)
[HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown.] at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,\ Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,\ Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Sorry but I get this error using the built in paypal provider not my custom provider. I havent written the full code for my custom provider yet as the CancelPayment method I have in the class (as per the instructions) never gets fired.
If you inherited the existing provider you can override the other methods to not do anything to avoid the error until you're ready with the full provider.
The error in question is for the CancelPaymentInternal method.
PayPal Refund Capture
Hi,
I am trying to capture a paypal refund back in to ucommerce to update the status. I can see that the IPN message is being sent to the correct url and /8/56/PaymentProcessor.axd has a 200 code in the log files, but nothing is being triggered within uCommerce.
I thought this would trigger the ToCancelled Pipeline as per the paypal setup instructions. I have uncommented the task in the ToCancelled.Config
<value>${ToCancelled.CancelPaymentTask}</value>
Is there something else I need to implement for the refund?
Thanks
Have you tried to iisreset your website? UCommerce caches that configuration so a restart of website is nessacerry to make the change take effect.
Regards Martin
Hi,
Yes I have tried that. The payment complete messages are coming through from paypal to checkout the orders, it just seems as though the Refund action is not attached to anything. Worst case I'll have to override the response class but I thought that the refunds were supposed to be received automatically.
Thanks
Hi again,
I'm sure that it is supposed to refund when you cancel a order. I will try to see if I can find anything that can explain why it doesn't trigger the cancel payment.
Edit:
Silly question - Before you cancel a payment have you checked that the money has been aquired?
Regards Martin
Hi, my Payments are going straight to Authorised - as its a SALE transaction. The payment status is marked as Completed in PayPal. I click the refind button and then check the IPN history. The message has been sent and below is the slighty edited IPN message.
In this message there are 2 transaction Ids:
The original transaction I was refunding is now the parent transaction: 1RU528763P9934120
And my IIS Log line showing the sucessful hit - obviously the log is an hour out as its on GMT
Hi
It seems fine to me. When you have placed an order what does the Payment Status on the order say (in uCommerce)?
Hi Cathy,
Refunds should be issue from uCommerce rather than PayPal. The idea is to keep order processing in uCommerce so you never have to log into PayPal. The ToCancelled pipeline has the refund task (it needs to be enabled by commenting it in).
The idea is that when an order is moved from new or completed status uCommerce will void or refund depending on what the starting point is.
Hope this helps.
Hi, ok I see - When I click this for a PayPal Direct Payment - My custom payment provider - the order moves to requires attention. I assume I have to write my own code to handle that. However on a paypal order I get and error below.
Error message
System.InvalidCastException: Unable to cast object of type 'PayPal.Manager.SDKConfigHandler' to type 'System.Xml.XmlNode'.
Stack trace
[InvalidCastException: Unable to cast object of type 'PayPal.Manager.SDKConfigHandler' to type 'System.Xml.XmlNode'.]
at com.paypal.sdk.core.Config..ctor()
at com.paypal.sdk.core.Config.get_Instance()
at com.paypal.sdk.core.APICallerBase.SetTrustManager()
at com.paypal.sdk.core.nvp.NVPAPICaller..ctor()
at com.paypal.sdk.services.NVPCallerServices.Initialize()
at UCommerce.Transactions.Payments.PayPal.PayPalPaymentMethodService.GetPayPalNVPCaller()
at UCommerce.Transactions.Payments.PayPal.PayPalPaymentMethodService.CancelPaymentInternal(Payment\ payment, String& status)
at UCommerce.Transactions.Payments.ExternalPaymentMethodService.CancelPayment(Payment\ paymentToCancel)
at UCommerce.Pipelines.OrderProcessing.CancelPaymentTask.Execute(PurchaseOrder\ purchaseOrder)
at UCommerce.Pipelines.Pipeline`1.Execute(T subject)
[PipelineException: Exception occoured while processing pipeline 'UCommerce.Pipelines.OrderProcessing.OrderProcessingPipeline'. See inner exception for details.]
at UCommerce.Pipelines.Pipeline`1.Execute(T subject)
at UCommerce.Transactions.OrderService.ChangeOrderStatus(PurchaseOrder purchaseOrder,\ OrderStatus newOrderStatus, String userName)
at UCommerce.Web.UI.Orders.ChangeOrderStatus.SaveOrderStatus()
at UCommerce.Web.UI.Orders.ChangeOrderStatus.SaveButton_Clicked(Object sender,\ EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,\ Boolean includeStagesAfterAsyncPoint)
[HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown.]
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,\ Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,\ Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Seems like a bug in your custom provider. Trying to put an object of type SDKConfigHandler into an XmlNode.
Hi,
Sorry but I get this error using the built in paypal provider not my custom provider. I havent written the full code for my custom provider yet as the CancelPayment method I have in the class (as per the instructions) never gets fired.
Any further help would be greatly appreciated.
Thanks
Cathy
HI Cathy,
If you inherited the existing provider you can override the other methods to not do anything to avoid the error until you're ready with the full provider.
The error in question is for the CancelPaymentInternal method.
is working on a reply...