Created
October 30, 2019 15:27
-
-
Save sadam1807/bca6d2154672c6f7d79e8004f68b51a5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import config from '../Utils/paymentForm'; | |
const Square = ({ paymentForm }) => { | |
paymentForm = new paymentForm(config); | |
paymentForm.build(); | |
const requestCardNonce = () =>{ | |
paymentForm.requestCardNonce(); | |
} | |
return ( | |
<div id="form-container"> | |
<div id="sq-card-number"></div> | |
<div className="third" id="sq-expiration-date"></div> | |
<div className="third" id="sq-cvv"></div> | |
<div className="third" id="sq-postal-code"></div> | |
<button id="sq-creditcard" className="button-credit-card" onClick={requestCardNonce}> Pay £ 1.00</button> | |
</div> | |
) | |
} | |
export default Square; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment