Created with Sketch.
Created with Sketch.
Checkout 3.0

External payments

External payment methods as PayPal is supported. Avarda will display the payment option in the checkout, when used the end customer is redirected back to partner page were the purchase is completed using the partner’s own integration towards PayPal.


Paypal

New payment method is displayed, if PayPal method is enabled in Partner Onboarding. When PayPal payment method is completed page is redirected to redirectUrl  which has to be provided to us by partner in Checkout 3.0 Initialize payment.

Configuration in simple steps:

  1. Partner Onboarding -> Checkout sites -> Enable PayPal checkbox
  2. Pass handleByMerchantCallback in Checkout 3.0 initialization
  3. Provide redirectUrl in Checkout 3.0 initialization
<script>
  var handleByMerchantCallback = function(avardaCheckoutInstance) {
    console.log("Handle external payment here");

    ...

    // Unmount Checkout from page when external payment is handled
    avardaCheckoutInstance.unmount();
  }

  window.avardaCheckoutInit({
    ...
    "handleByMerchantCallback": handleByMerchantCallback,
    "redirectUrl": "www.mytesteshop.com/"
    ...
  });
</script>

PayPal payment panel should be displayed, if PayPal is enabled in Partner Onboarding.

After user select one of these external payment methods, the callback defined during initialization will be run.