<application>
...
<!-- Enables the Google Pay API -->
<meta-data android:name="com.google.android.gms.wallet.api.enabled"
android:value="true" />
</application>
sdk.createGooglePayment— Creating a payment using Google Pay.
createPaymentDataRequest() — A method that returns a PaymentDataRequest object. This object defines the parameters and requirements for the payment data request, such as payment methods, shipping address, and more (the code is provided below).
loadPaymentData() — Initiates an asynchronous task to load payment data using the provided request.
AutoResolveHelper.resolveTask<PaymentData>()— A method used to handle the payment data loading task.
REQUEST_CODE— A request code used to identify the result of the task in the onActivityResult method.
The createPaymentDataRequest() method creates and returns a PaymentDataRequest object for use with the Google Pay API#
PaymentDataRequest.newBuilder() - Creates a new builder for the payment data request.
setTransactionInfo() - Sets transaction information, such as the total payment amount and currency code.
PaymentMethodTokenizationParameters.newBuilder() - Creates a builder for the payment method tokenization parameters.
setPaymentMethodTokenizationType() - Sets the tokenization type (in this case, a payment gateway).
addParameter() - Adds parameters for the payment gateway, such as gateway and gatewayMerchantId.
setPaymentMethodTokenizationParameters() - Sets the tokenization parameters in the payment data request.