Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Cathy Pank 21 posts 41 karma points
    May 08, 2013 @ 14:30
    Cathy Pank
    0

    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

     

  • Martin 181 posts 740 karma points
    May 09, 2013 @ 16:43
    Martin
    0

    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

  • Cathy Pank 21 posts 41 karma points
    May 09, 2013 @ 18:38
    Cathy Pank
    0

    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

  • Martin 181 posts 740 karma points
    May 10, 2013 @ 19:32
    Martin
    0

    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

  • Cathy Pank 21 posts 41 karma points
    May 15, 2013 @ 18:25
    Cathy Pank
    0

    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:

    &parent_txn_id=1RU528763P9934120
    &txn_id=8RL12534U3062102X

    The original transaction I was refunding is now the parent transaction: 1RU528763P9934120

    mc_gross=-190.00
    &invoice=Xxxxxxxx
    &protection_eligibility=Ineligible
    &item_number1=
    &payer_id=xxxxxxxxx
    &payment_date=09:16:36 May 15, 2013 PDT
    &payment_status=Refunded
    &charset=windows-1252
    &mc_shipping=0.00
    &mc_handling=0.00
    &first_name=John
    &mc_fee=-6.46
    &notify_version=3.7
    &reason_code=refund
    &custom=
    &business=xxxxxxxxx@xxxxx
    &mc_handling1=0.00
    &verify_sign=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    &[email protected]
    &mc_shipping1=0.00
    &tax1=0.00
    &parent_txn_id=1RU528763P9934120
    &txn_id=8RL12534U3062102X
    &payment_type=instant
    &last_name=Test
    &item_name1=Sum
    &receiver_email=xxxxxxxxxxxxx@xxxxxxxxxxxx
    &payment_fee=
    &quantity1=1
    &receiver_id=xxxxxxxxxxxxxxx
    &mc_gross_1=190.00
    &mc_currency=GBP
    &residence_country=GB
    &test_ipn=1
    &transaction_subject=Shopping CartSum
    &payment_gross=
    &ipn_track_id=6ca97dc55212

    And my IIS Log line showing the sucessful hit - obviously the log is an hour out as its on GMT

    2013-05-15 16:16:39 173.0.82.126 - - - 109.104.94.188 80 POST /8/63/PaymentProcessor.axd - 200 0 0 - - 1593 - - - - - - - - - - - - 
  • Martin 181 posts 740 karma points
    May 22, 2013 @ 18:58
    Martin
    0

    Hi

    It seems fine to me. When you have placed an order what does the Payment Status on the order say (in uCommerce)?

  • Søren Spelling Lund 1797 posts 2786 karma points
    May 22, 2013 @ 23:25
    Søren Spelling Lund
    0

    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. 

  • Cathy Pank 21 posts 41 karma points
    Jun 06, 2013 @ 11:32
    Cathy Pank
    0

    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)
  • Søren Spelling Lund 1797 posts 2786 karma points
    Jun 07, 2013 @ 16:08
    Søren Spelling Lund
    0

    Seems like a bug in your custom provider. Trying to put an object of type SDKConfigHandler into an XmlNode. 

  • Cathy Pank 21 posts 41 karma points
    Jun 11, 2013 @ 18:50
    Cathy Pank
    0

    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 

  • Søren Spelling Lund 1797 posts 2786 karma points
    Jul 01, 2013 @ 15:57
    Søren Spelling Lund
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft