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.

  • Kenn Jacobsen 133 posts 791 karma points MVP 4x c-trib
    Jul 26, 2012 @ 13:16
    Kenn Jacobsen
    0

    Manually invoking the PaymentProcessor

    Hi,

    We're about to start implementing an integration with a payment provider that's not supported out of the box (Nets). This particular payment provider uses an external payment window, but apparently it does not support an explicit callback to our shop once payment is completed; instead the payment provider simply makes an automatic redirect to our receipt page (on which we're then forced to do a double check on the payment status etc.). 

    As I understand the article "Integrating with a Payment Gateway using External Payment Windows" on publicvoid.dk (http://www.publicvoid.dk/IntegratingWithAPaymentGatewayUsingExternalPaymentWindows.aspx), The PaymentProcessor needs to be invoked in order to update the order as authorized by the payment provider. Since we don't have the option to force our payment provider to call PaymentProcessor.axd, is there a way we can invoke the PaymentProcessor to have the payment status to be updated?

    Regards,
    Kenn

  • Kenn Jacobsen 133 posts 791 karma points MVP 4x c-trib
    Aug 02, 2012 @ 07:32
    Kenn Jacobsen
    0

    Uhm... anyone...?

  • Søren Spelling Lund 1797 posts 2786 karma points
    Aug 07, 2012 @ 10:59
    Søren Spelling Lund
    0

    Hi Kenn,

    Are you sure that the callback is not supported? It would be the first time I come across a gateway that works like that. Might be it's async?

    If indeed you never receive a callback you can, even though it's a little icky, invoke the ProcessCallback method of your payment method service manually on your confirm page.

    You don't specifcally have to invoke the method via the PaymentProcessor.axd. It's just there to parse incoming callbacks/IPNs for you. In your case you'll have the page available and can parse the request yourself. Makes for a much simpler solution.

    Something like this (ish); assuming payment reference is passed to you by the gateway:

    string paymentReference = Request.QueryString["orderid"];
    var payment = Payment.SingleOrDefault(x => x.Reference == paymentReference);

    // Proceed only if expected payment status
    if (payment.PaymentStatus.PaymentStatusId != (int)PaymentStatusCode.PendingAuthorization)
    throw new InvalidOperationException("Payment is not of expected payment status");

    // Do validation of the received values, typically MD5 check, amounts, currency
    bool requestOk = ...;

    if (requestOk)
    {
    payment.PaymentStatus = PaymentStatus.Get((int)PaymentStatusCode.Authorized);
    payment.Save();

    var checkoutPipeline = PipelineFactory.Create<PurchaseOrder>("chechkout");
    chechoutPipline.Execute(payment.PurchaseOrder);
    }
  • Kenn Jacobsen 133 posts 791 karma points MVP 4x c-trib
    Aug 09, 2012 @ 10:34
    Kenn Jacobsen
    0

    Thanks Søren,

    I'm baffled about the lack of automatic callback too, but apparently Nets does not support it. I'm in contact with their support now and until now they confirm that indeed an automatic callback is not supported.

    Thank you for the code snippet - I'm sure it will come in handy if we actually proceed with Nets. But the lack of callback will probably mean that we'll convince the customer to switch to another provider (one that's already supported by uCommerce).

    Cheers,
    Kenn

  • Søren Spelling Lund 1797 posts 2786 karma points
    Aug 29, 2012 @ 10:52
    Søren Spelling Lund
    0

    Any further developments on this? I'm very interested in finding out whether they truly don't support callback.

  • Kenn Jacobsen 133 posts 791 karma points MVP 4x c-trib
    Sep 10, 2012 @ 07:59
    Kenn Jacobsen
    0

    Hi Søren,

    Sorry for the late reply, I've been vacationing... :)

    We've been in touch with Nets support over the past weeks and it really is true - Nets relies solely on a redirect back to the shop, Nets do NOT support automatic callback. 

    For this reason we've decided to scrap Nets as provider. 

    Thanks for your help!

    Kenn

  • Balbir 10 posts 52 karma points
    Aug 27, 2014 @ 09:28
    Balbir
    0

    Hi Soren,

    I am also workin on "External Payment Gateway" using the "Innovate Payments" as the service provider. They have a provision for explicit "Call back Url".

    As autocallback doesn't seem to be supported by my provider, what explicit Url should i be providing. Going through some examples i have come to know that it should be something like - "http://mysite.com/6/f417c364-de66-4a8a-9367-48a99d6dcbba/PaymentRequest.axd" where 6 stands for payment id & the later stands for the order id but this can be used in auto callbacks. Can i directly provide the call back url as "http://mysite.com/PaymentRequest.axd" to my service provider. Or as u have mentioned above a call back page wherein i should write the codes to perform the checks.?

    I am already running tight with my project schedule.. Any quick help/response will be much appreciated.

     

    Many thanks.

    Balbir

  • Balbir 10 posts 52 karma points
    Sep 02, 2014 @ 09:26
    Balbir
    0

    any one.. ?

Please Sign in or register to post replies

Write your reply to:

Draft