Google Pay Control Object
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.
amountField
specified - in this case Google Pay total amount will be automatically updated whenever amount has changedamountField
is 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.updateAmount
manually.iframeField
specified - this value will be used to communicate with Google Pay button. This option is especially helpful for Angular clients using shadow DOM.iframeField
is not specified - it’s value will be calculated based ondata-ifields-id
attribute. In this case it must be set to “igp“:data-ifields-id="igp"
.
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 modified 9mo ago