Copied to clipboard

Flag this post as spam?

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


  • Preethi 32 posts 99 karma points
    Jun 27, 2016 @ 18:26
    Preethi
    0

    Custom Payment Provider

    I am now integrating a new payment provider - Braintree within Tea Commerce. Its an inline payment provider. I have tried to use the payment providers code similar to the one for Stripe. My form submits fine and the cart changes to an Order. I am able to obtain the transactionid which gets updated within DB, email is generated etc

    I am not sure how but, On continue URL I seem to have an issue that a new cart with the next cartid gets created with the same items in the basket once again. So the cart never gets emptied. The code definitely hits ProcessCallback.

    Whats the difference between ProcessCallback and ProcessRequest?

    I am using Umbraco 7 and Tea commerce version 3.1.0 with Variants

    Thanks

  • Anders Burla Johansen 2560 posts 8256 karma points
    Jun 29, 2016 @ 10:19
    Anders Burla Johansen
    0

    Hi Preethi

    ProcessCallback is the method that will finalize the order. Where ProcessRequest is for getting a request into the payment provider. What you then use that request to do is up to you as a developer.

    When you call TC.GeneratePaymentForm for an order - the order is locked. If ANY important info changes on it, it will create a copy and move that as the current order in session. So if everything is working but you have a copy order - you should look for anycode that uses TC. (Razor API) methods for changing the order, AFTER you have called GeneratePaymentForm.

    Kind regards

    Anders

  • Preethi 32 posts 99 karma points
    Jun 30, 2016 @ 11:43
    Preethi
    0

    I have checked the code. CartStep4 where one finalises the order, the order does not get copied. When I select the 'Accept and Pay' the payment form is displayed which in my case is CartStep5. At that point I can see in the DB the order is duplicated. I am not using any TC. in my razor apis except for the one within the minicart view. I am at a loss to see why the cart is getting duplicated. This is the form action I can see in CartStep4 for my new custom payment provider. I pass the hidden cancelurl, continueurl and a client token to the form

    form action="/en/shop/cart-content/payment/" method="post" input type="hidden" id="continueurl" name="continueurl" value="http://localhost/base/TC/PaymentContinue/1/Braintree%20-%20inline/5573f4fd-60a1-49b8-8c9f-322fa634c2d8/dcd9259b63f8a1baefdb9493d8a87f83fae4766810091659a54cfffe0ab7c23f.aspx" input type="hidden" id="cancelurl" name="cancelurl" value="http://localhost/base/TC/PaymentCancel/1/Braintree%20-%20inline/5573f4fd-60a1-49b8-8c9f-322fa634c2d8/dcd9259b63f8a1baefdb9493d8a87f83fae4766810091659a54cfffe0ab7c23f.aspx" input type="hidden" id="clienttoken" name="clienttoken" button type="submit" class="button float-right">Accept and pay

  • Preethi 32 posts 99 karma points
    Jun 30, 2016 @ 16:01
    Preethi
    0

    Yes you were right. I was using the TC within the master model to set the country and this was being called in the Master Template. I have now removed the code and the cart gets emptied after payment. Tks. The issue can be closed

  • Rune Grønkjær 1296 posts 2863 karma points
    Jul 19, 2016 @ 06:10
    Rune Grønkjær
    100

    Hi Preethi,

    Please mark your post as the correct answer if you can. :)

    /Rune

Please Sign in or register to post replies

Write your reply to:

Draft