Git Product home page Git Product logo

stripe-3d-secure's Issues

Only Loading... Please wait... after that show blank page, i'm try o make custom script.

This is my custom script :

function onClick() {
var name = document.getElementById('holder').value;
var address_line1 = document.getElementById('address').value;
var address_city = document.getElementById('town').value;
var address_state = document.getElementById('county').value;
var address_zip = document.getElementById('postcode').value;
var address_country = document.getElementById('country').value;
var cardNumber = document.getElementById('ccno').value;
var input = document.getElementById('ccexp').value;
var fields = input.split('/');
var expMonth = fields[0];
var expYear = '20'+fields[1];
var cvc = document.getElementById('secode').value;
const paymentRequest = {
name: name,
address_line1: address_line1,
address_city: address_city,
address_state: address_state,
address_zip: address_zip,
address_country: address_country,
cardNumber: cardNumber,
expMonth: expMonth,
expYear: expYear,
cvc: cvc,
currency: 'usd',
amount: 100,
nativeElement: document.querySelector('#iframe-payment')
};

paymentRequest.nativeElement.innerHTML = 'Loading... Please wait...';

doPayment(paymentRequest).then((result) => {
paymentRequest.nativeElement.innerHTML = 'Success!!!! Your details are correct!!!';
window.location.replace = window.location.protocol + '//' + window.location.hostname + '/success';
}).catch((error) => {
console.error(error);
paymentRequest.nativeElement.innerHTML = 'Ups! We can\t validate your details...';
alert('Your credit card was declined. Please enter another credit card or check your info');
});
}

how to make work this script, I'm ready to set my pk_live.But i got error.Only Loading... Please wait... after that show bank page without any redirect .

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.