Google Pay Control Object
window.ckGooglePay object - controls initialization of Google Pay button.
Method
Call Required
Description
enableGooglePay
Yes
Initializes and enables Google Pay Button. Takes EnableGooglePayParams object
updateAmount
Conditional
Updates amount on Google Sheet.
You can provide either All, One or None of the parameters for enableGooglePay call.
amountFieldspecified - in this case Google Pay total amount will be automatically updated whenever amount has changedamountFieldis not specified - in this case it’s up to you to provide the correct amount for Google Pay. One of the ways to do it is to callwindow.ckGooglePay.updateAmountmanually.iframeFieldspecified - this value will be used to communicate with Google Pay button. This option is especially helpful for Angular clients using shadow DOM.iframeFieldis not specified - it’s value will be calculated based ondata-ifields-idattribute. In this case it must be set to “igp“:data-ifields-id="igp".
EnableGooglePayParams Object
Name
Type
Required
Description
amountField
String|Object
No
Field containing amount. Could be either name of the field (String) or field itself (Object)
iframeField
String|Object
No
Field containing iframe with Google Pay button. Could be either name of the field (String) or field itself (Object)
Enable Google Pay example
ckGooglePay.enableGooglePay({amountField: 'amount'});Last updated
Was this helpful?

