Class CustomSheetPaymentInfo.Builder
java.lang.Object
com.samsung.android.sdk.samsungpay.v2.payment.CustomSheetPaymentInfo.Builder
- Enclosing class:
- CustomSheetPaymentInfo
This is builder class for constructing CustomSheetPaymentInfo object.
- Since:
- API Level 1.3
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
API to build CustomSheetPaymentInfo object.API to enforce the payment sheet.
If partner wants to show payment sheet even though Fast Checkout is enabled,
they can show payment sheet using this API method.setAddressInPaymentSheet
(CustomSheetPaymentInfo.AddressInPaymentSheet addressInPaymentSheet) API to set the address display option for payment sheet.setAllowedCardBrands
(List<SpaySdk.Brand> brands) API to set the card brands list supported by merchant.setCardHolderNameEnabled
(boolean isCardHolderNameRequired) API to set the flag if merchant wants to display card holder's name.setCustomSheet
(CustomSheet customSheet) API to set customSheet.setExtraPaymentInfo
(android.os.Bundle extraPaymentInfo) API to set the extra payment information data.setMerchantCountryCode
(String merchantCountryCode) API to set the merchant country code.setMerchantId
(String merchantId) API to set the merchant reference ID.setMerchantName
(String merchantName) API to set the merchant name.setOrderNumber
(String orderNumber) API to set the order number.setPaymentCardBrand
(SpaySdk.Brand cardBrand) API to set the card brand for payment transaction.
This API can be used withsetPaymentCardLast4DPAN(String)
or
setPaymentCardLast4FPAN(String)
API method to designate specific card for the transaction.setPaymentCardLast4DPAN
(String last4digits) API to set the last 4 digits of DPAN for payment transaction.
This API can be used withsetPaymentCardBrand(SpaySdk.Brand)
API method to designate specific card for the transaction.setPaymentCardLast4FPAN
(String last4digits) API to set the last 4 digits of FPAN for payment transaction.
This API can be used withsetPaymentCardBrand(SpaySdk.Brand)
API method to designate specific card for the transaction.setPaymentShippingMethod
(String shippingMethod) API to set the shipping method for payment transaction.setRecurringEnabled
(boolean isRecurring) API to set if payment is recurring.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setMerchantId
API to set the merchant reference ID.- Parameters:
merchantId
- Merchant reference ID which can be used for merchant's own purpose.
For example, if merchant uses a Payment Gateway which requires Payment Gateway User ID, then merchantId field can be set with a Payment Gateway User ID.- Returns:
- CustomSheetPaymentInfo Builder.
- Since:
- API Level 1.3
-
setMerchantName
API to set the merchant name.- Parameters:
merchantName
- Merchant name.- Returns:
- CustomSheetPaymentInfo Builder.
- Since:
- API Level 1.3
-
setOrderNumber
API to set the order number.- Parameters:
orderNumber
- Order number sent by merchant for records.
The allowed characters are [A-Z][a-z][0-9,-] & up to 36 characters.
This field is mandatory for VISA.- Returns:
- CustomSheetPaymentInfo Builder.
- Since:
- API Level 1.3
-
setAddressInPaymentSheet
public CustomSheetPaymentInfo.Builder setAddressInPaymentSheet(CustomSheetPaymentInfo.AddressInPaymentSheet addressInPaymentSheet) API to set the address display option for payment sheet.- Parameters:
addressInPaymentSheet
- Address UI to display on the payment sheet.- Returns:
- CustomSheetPaymentInfo Builder.
- Since:
- API Level 1.3
- See Also:
-
setAllowedCardBrands
API to set the card brands list supported by merchant.- Parameters:
brands
- Card brands supported by merchant for payment.- Returns:
- CustomSheetPaymentInfo Builder.
- Since:
- API Level 1.3
-
setCardHolderNameEnabled
API to set the flag if merchant wants to display card holder's name.
Set to true if card holder's name should be displayed with card information on the payment sheet.
If issuer does not provide card holder's name, it will not be displayed.- Parameters:
isCardHolderNameRequired
- True, if merchant wants to display card holder's name on the payment sheet.- Returns:
- CustomSheetPaymentInfo Builder.
- Since:
- API Level 1.3
-
setRecurringEnabled
API to set if payment is recurring.- Parameters:
isRecurring
- True, if payment is recurring.- Returns:
- CustomSheetPaymentInfo Builder.
- Since:
- API Level 1.3
-
setMerchantCountryCode
API to set the merchant country code.
This API internally verifies and sets two-letter merchant country code, if it is a valid country code.- Parameters:
merchantCountryCode
- Country code, where merchant is operating.- Returns:
- CustomSheetPaymentInfo Builder.
- Throws:
IllegalArgumentException
- If merchantCountryCode is invalid.- Since:
- API Level 1.3
-
setCustomSheet
API to set customSheet.- Parameters:
customSheet
- CustomSheet configured by merchant.- Returns:
- CustomSheetPaymentInfo Builder.
- Since:
- API Level 1.3
-
setExtraPaymentInfo
API to set the extra payment information data.- Parameters:
extraPaymentInfo
- Extra PaymentInfo data.- Returns:
- CustomSheetPaymentInfo Builder.
- Since:
- API Level 1.3
-
enableEnforcePaymentSheet
API to enforce the payment sheet.
If partner wants to show payment sheet even though Fast Checkout is enabled,
they can show payment sheet using this API method.- Returns:
- CustomSheetPaymentInfo Builder.
- Since:
- API Level 1.7
-
setPaymentCardLast4DPAN
API to set the last 4 digits of DPAN for payment transaction.
This API can be used withsetPaymentCardBrand(SpaySdk.Brand)
API method to designate specific card for the transaction.- Parameters:
last4digits
- The last 4 digits of DPAN for payment transaction.- Returns:
- CustomSheetPaymentInfo Builder.
- Since:
- API Level 1.7
-
setPaymentCardLast4FPAN
API to set the last 4 digits of FPAN for payment transaction.
This API can be used withsetPaymentCardBrand(SpaySdk.Brand)
API method to designate specific card for the transaction.- Parameters:
last4digits
- The last 4 digits of FPAN for payment transaction.- Returns:
- CustomSheetPaymentInfo Builder.
- Since:
- API Level 1.7
-
setPaymentCardBrand
API to set the card brand for payment transaction.
This API can be used withsetPaymentCardLast4DPAN(String)
or
setPaymentCardLast4FPAN(String)
API method to designate specific card for the transaction.- Parameters:
cardBrand
- Card brand.- Returns:
- CustomSheetPaymentInfo Builder.
- Since:
- API Level 1.7
- See Also:
-
setPaymentShippingMethod
API to set the shipping method for payment transaction.- Parameters:
shippingMethod
- Shipping method.- Returns:
- CustomSheetPaymentInfo Builder.
- Since:
- API Level 1.7
-
build
API to build CustomSheetPaymentInfo object.- Returns:
- CustomSheetPaymentInfo object.
- Since:
- API Level 1.3
-
Samsung Electronics.
Samsung Pay SDK 2.19.00 - Jun 12 2024