Copied to clipboard

Flag this post as spam?

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


  • Jonas Eriksson 930 posts 1825 karma points
    Mar 13, 2015 @ 15:04
    Jonas Eriksson
    0

    How to refund when purchaseOperation = SALE

    We're using the Payex provider and try to make a refund via the TeaCommerce order UI.

    When we have purchase option Authorize the payment is set to Authorized after successful payment - after that we can both 1) capture and 2) refund with no problems.

    However - when we set the purchase option to Sale - the payment status is set to "Initialized" after successful payment, and we cannot do anything with it with the help of the order UI.

    Is it something we misunderstood?

    Also - we'd like to make a refund with the help of the api somehow if possible. Can we do that?

    Thanks

    Jonas

  • Anders Burla 2560 posts 8256 karma points
    Mar 13, 2015 @ 15:08
    Anders Burla
    0

    If the status is "Initilalized" then the callback didn't work as it would set it to "Authorized" or "Captured". So look into debugging the callback parts.

    Kind regards
    Anders

  • Jonas Eriksson 930 posts 1825 karma points
    Mar 13, 2015 @ 15:10
    Jonas Eriksson
    0

    Another detail I noticed is first after the payment is made the status is actually "Captured" in the list with orders. However when I open the actual order in Teacommerce the status is changed to "Initialized" (and I did not change anything myself).

    I run this in test mode.

  • Jonas Eriksson 930 posts 1825 karma points
    Mar 13, 2015 @ 15:58
    Jonas Eriksson
    0

    I'm not sure where to debug it -

    if I look in the database PaymentState = 2 after payment. But when I open the order PaymentState is being set to = 0. 

    The callback xml seems ok (test data) (?)

    Xml return:

    <?xml version="1.0" encoding="utf-8" ?><payex><header name="Payex Header v1.0"><id>0393a280a49a4e2dbb113ace0c8129f8</id><date>2015-03-13 14:18:14</date></header><status><code>OK</code><description>OK</description><errorCode>OK</errorCode><errorCodeSimple>OK</errorCodeSimple><paramName /><thirdPartyError /><thirdPartySubError /></status><transactionStatus>0</transactionStatus><orderStatus>0</orderStatus><transactionRef>111b00ed1a444df398eae39aba558030</transactionRef><transactionNumber>5589062</transactionNumber><orderId>CART-560</orderId><productId>3098</productId><paymentMethod>MC</paymentMethod><amount>50000</amount><alreadyCompleted>False</alreadyCompleted><Csid>00000001-5476-2100-0009-000000000000</Csid><clientAccount>0</clientAccount><productNumber>3098</productNumber><clientGsmNumber /><BankHash>00000001-5476-2100-0009-000000000000</BankHash><AuthenticatedWith>Y</AuthenticatedWith><AuthenticatedStatus>3DSecure</AuthenticatedStatus><maskedNumber>54**********0009</maskedNumber><captureTokens><stan>1337</stan><terminalId>666</terminalId><transactionTime>3/13/2015 2:18:13 PM</transactionTime></captureTokens><fraudData>false</fraudData><pending>false</pending></payex>

  • Jonas Eriksson 930 posts 1825 karma points
    Mar 16, 2015 @ 10:32
    Jonas Eriksson
    0

    We tried this in live environment now - with same problem. So we cannot use "refund", which is a bit unfortunate.

    We'd be very happy with a little bit of feeback on what could be wrong. The callback part does seem to work as I mentioned. The problem appears to happen at a later state - when we open a order with status "Captured" something changes it to "Initialized". And therefore we cannot refund.

    Kind regards

    Jonas

  • Anders Burla 2560 posts 8256 karma points
    Mar 16, 2015 @ 12:16
    Anders Burla
    0

    Hi Jonas

    If you want super snappy support - be sure to look at our Confidence product
    http://teacommerce.net/products/confidence/

    It looks like the callback is working well. What happens when you edit an order in Tea Commerce - it sees if the payment provider support getting the status of a transaction. Payex supports that. But something goes wrong in that API call and the status is set to initialized because of that. So the way to debug it is to get the payment provider API downloaded and build a debug version. And then run a local test where you can set a breakpoint and see what goes on.
    You can see the code for Payex here:
    https://github.com/TeaCommerce/Payment-providers/blob/master/Source/TeaCommerce.PaymentProviders/Classic/PayEx.cs

    Hope this helps you in the right direction.

    Kind regards
    Anders 

Please Sign in or register to post replies

Write your reply to:

Draft