GooglePayJsonFactory
@Singleton
Content copied to clipboard
A factory for generating Google Pay JSON request objects for Google Pay API version 2.0.
Constructors
Link copied to clipboard
fun GooglePayJsonFactory(context: Context, isJcbEnabled: Boolean = false)
Content copied to clipboard
PaymentConfiguration must be instantiated before calling this.
Link copied to clipboard
fun GooglePayJsonFactory(googlePayConfig: GooglePayConfig, isJcbEnabled: Boolean = false)
Content copied to clipboard
Types
Link copied to clipboard
data class BillingAddressParameters @JvmOverloads constructor(isRequired: Boolean, format: GooglePayJsonFactory.BillingAddressParameters.Format, isPhoneNumberRequired: Boolean) : Parcelable
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class ShippingAddressParameters @JvmOverloads constructor(isRequired: Boolean, allowedCountryCodes: Set<String>, phoneNumberRequired: Boolean) : Parcelable
Content copied to clipboard
Link copied to clipboard
data class TransactionInfo @JvmOverloads constructor(currencyCode: String, totalPriceStatus: GooglePayJsonFactory.TransactionInfo.TotalPriceStatus, countryCode: String?, transactionId: String?, totalPrice: Int?, totalPriceLabel: String?, checkoutOption: GooglePayJsonFactory.TransactionInfo.CheckoutOption?) : Parcelable
Content copied to clipboard
Functions
Link copied to clipboard
fun createIsReadyToPayRequest(billingAddressParameters: GooglePayJsonFactory.BillingAddressParameters? = null, existingPaymentMethodRequired: Boolean? = null): JSONObject
Content copied to clipboard
Link copied to clipboard
fun createPaymentDataRequest(transactionInfo: GooglePayJsonFactory.TransactionInfo, billingAddressParameters: GooglePayJsonFactory.BillingAddressParameters? = null, shippingAddressParameters: GooglePayJsonFactory.ShippingAddressParameters? = null, isEmailRequired: Boolean = false, merchantInfo: GooglePayJsonFactory.MerchantInfo? = null): JSONObject
Content copied to clipboard