Class CardPaymentMethodJsonBuilder
-
- All Implemented Interfaces:
public class CardPaymentMethodJsonBuilderThis class provides methods to build
PaymentMethodwith type CARD in JSON format.
-
-
Constructor Summary
Constructors Constructor Description CardPaymentMethodJsonBuilder()
-
Method Summary
-
-
Method Detail
-
setAllowPrepaidCards
CardPaymentMethodJsonBuilder setAllowPrepaidCards(boolean allowPrepaidCards)
Optional. Sets if prepaid card are allowed.
- Parameters:
allowPrepaidCards- Set tofalseif you don't support prepaid cards.- Returns:
a reference to this object.
-
setAllowCreditCards
CardPaymentMethodJsonBuilder setAllowCreditCards(boolean allowCreditCards)
Optional (Required for UK Gambling merchants). Sets if credit cards are allowed.
- Parameters:
allowCreditCards- Set tofalseif you don't support credit cards.- Returns:
a reference to this object.
-
setAssuranceDetailsRequired
CardPaymentMethodJsonBuilder setAssuranceDetailsRequired(boolean assuranceDetailsRequired)
Optional. Sets if assurance details are required.
- Parameters:
assuranceDetailsRequired- Set totrueto requestassuranceDetails.- Returns:
a reference to this object.
-
setBillingAddressRequired
CardPaymentMethodJsonBuilder setBillingAddressRequired(boolean billingAddressRequired)
Optional. Sets if billing address is required.
- Parameters:
billingAddressRequired- Set totrueif you require a billing address.- Returns:
a reference to this object.
-
setBillingAddressParameters
CardPaymentMethodJsonBuilder setBillingAddressParameters(@Nullable() String format, boolean phoneNumberRequired)
Optional. Sets billing address parameters. The expected fields returned if
billingAddressRequiredis set totrue.- Parameters:
format- Billing address format required to complete the transaction.phoneNumberRequired- Set totrueif a phone number is required to process the transaction.- Returns:
a reference to this object.
-
toJson
@NonNull() JSONObject toJson()
Returns the
PaymentMethodas JSONObject.- Returns:
the card payment method JSON.
-
setAllowedAuthMethods
CardPaymentMethodJsonBuilder setAllowedAuthMethods(@NonNull() JSONArray allowedAuthMethods)
Required. Sets the fields supported to authenticate a card transaction. PAN_ONLY: This authentication method is associated with payment cards stored on file with the user's Google Account. Returned payment data includes personal account number (PAN) with the expiration month and the expiration year. CRYPTOGRAM_3DS: This authentication method is associated with cards stored as Android device tokens. Returned payment data includes a 3-D Secure (3DS) cryptogram generated on the device.
- Parameters:
allowedAuthMethods- The allowed authentication methods.- Returns:
a reference to this object.
-
setAllowedCardNetworks
CardPaymentMethodJsonBuilder setAllowedCardNetworks(@NonNull() JSONArray allowedCardNetworks)
Required. Sets one or more card networks that you support, also supported by the Google Pay API.
- Parameters:
allowedCardNetworks- The allowed card networks.- Returns:
a reference to this object.
-
setGatewayMerchantId
CardPaymentMethodJsonBuilder setGatewayMerchantId(@NonNull() String gatewayMerchantId)
Required. Sets the gateway merchant id.
- Parameters:
gatewayMerchantId- The entity Id which will be used asgatewayMerchantId.- Returns:
a reference to this object.
-
setGateway
CardPaymentMethodJsonBuilder setGateway(@NonNull() String gateway)
Optional. Sets the gateway name.
- Parameters:
gateway- The name of the payment gateway.- Returns:
a reference to this object.
-
-
-
-