Page History
...
An example of the addGooglePayButton function that adds a large black button:
Code Block | ||
---|---|---|
| ||
function addGooglePayButton() {
const paymentsClient = getGooglePaymentsClient();
const button =
paymentsClient.createButton({onClick: onGooglePaymentButtonClicked, buttonColor:'black', buttonType:'long'}); //button creation
document.getElementById('container').appendChild(button); // adding a button to a page
document.getElementById('container').style.display = 'block';
} |