-2

I want to use pay by creditcard but I haven't any progress in my task. this is my code that I try but nothing happen.

<html>
  <head>
     <script type="text/javascript">
        function onVisaCheckoutReady(){
          V.init( {
            apikey: "7O07VN664O10JW6A9ESS113p8sf9JeGzr6_2haC9F9m_ANtLM",
             paymentRequest:{
              currencyCode: "USD",
              total: "10.00"
            }
          });
          V.on("payment.success", function(payment) {
            alert(JSON.stringify(payment));
          });
          V.on("payment.cancel", function(payment) {
            alert(JSON.stringify(payment)); 
          });
          V.on("payment.error", function(payment, error) {
            alert(JSON.stringify(error)); 
          });
        }
     </script>
  </head>
  <body>
     <img alt="Visa Checkout" class="v-button" role="button"
        src="https://sandbox.secure.checkout.visa.com/wallet-services-web/xo/button.png"/>
     <script type="text/javascript"
        src="https://sandbox-assets.secure.checkout.visa.com/checkout-widget/resources/js/integration/v1/sdk.js">
     </script>
  </body>
</html>

any one can help me ? and also I get some code from Visa official site but can't understand to use that.

Kevin Kopf
  • 13,327
  • 14
  • 49
  • 66
Nasser Ali Karimi
  • 4,462
  • 6
  • 34
  • 77

1 Answers1

0

You can simply sue stripe-php library to configure any type of credit Card that you want it is so easy and very responsive by each gateway payment service.

Nasser Ali Karimi
  • 4,462
  • 6
  • 34
  • 77