1

I am trying to integrate checkout payment gateway with angularJS. Code is working perfectly on index.html but not on inner ui-routing pages.

Documentation of payment checkout is given here: https://docs.checkout.com/getting-started/checkout-js-v2/display-options

<form class="payment-form" method="POST" action="https://merchant.com/successUrl">
  <script >
    window.CKOConfig = {
      publicKey: 'pk_test_6ff46046-30af-41d9-bf58-929022d2cd14',
      customerEmail: 'user@email.com',
      appMode: 'lightbox',
      value: 100,
      currency: 'EUR',
      renderMode:  0
    };
  </script>
  <script type="application/javascript" ng-src="https://cdn.checkout.com/v2/sandbox/js/checkout.js"></script>
</form>

Please help.

masterpreenz
  • 2,280
  • 1
  • 13
  • 21
Shifali singla
  • 76
  • 1
  • 2
  • 8
  • Can you provide `console errors` on the involved pages `but not on inner ui-routing pages.` It's hard to guess what's going on. – masterpreenz Sep 26 '17 at 07:15
  • @masterpreenz there are no console errors. I am guessing , problem is with ui-routing. – Shifali singla Sep 26 '17 at 07:17
  • ` – masterpreenz Sep 26 '17 at 07:30
  • @masterpreenz I have tried this too. Its not working – Shifali singla Sep 26 '17 at 10:51
  • Cross Origin error when appending? It just means they `the checkout` prohibits such action. To _improvise_ though it's untested and fresh from my mind, you can just actually put the checkout script in `index.html` then dynamically moving the checkout template using [$.appendTo](https://www.freecodecamp.org/challenges/use-appendto-to-move-elements-with-jquery) everytime you needed it. – masterpreenz Sep 27 '17 at 01:19

0 Answers0