Class CustomSheetPaymentInfo.Builder

java.lang.Object
com.samsung.android.sdk.samsungpay.v2.payment.CustomSheetPaymentInfo.Builder
Enclosing class:
CustomSheetPaymentInfo

public static class CustomSheetPaymentInfo.Builder extends Object
This is builder class for constructing CustomSheetPaymentInfo object.
Since:
API Level 1.3
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • setMerchantId

      public CustomSheetPaymentInfo.Builder setMerchantId(String merchantId)
      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

      public CustomSheetPaymentInfo.Builder setMerchantName(String merchantName)
      API to set the merchant name.
      Parameters:
      merchantName - Merchant name.
      Returns:
      CustomSheetPaymentInfo Builder.
      Since:
      API Level 1.3
    • setOrderNumber

      public CustomSheetPaymentInfo.Builder setOrderNumber(String orderNumber)
      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

      public CustomSheetPaymentInfo.Builder setAllowedCardBrands(List<SpaySdk.Brand> brands)
      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

      public CustomSheetPaymentInfo.Builder setCardHolderNameEnabled(boolean isCardHolderNameRequired)
      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

      public CustomSheetPaymentInfo.Builder setRecurringEnabled(boolean isRecurring)
      API to set if payment is recurring.
      Parameters:
      isRecurring - True, if payment is recurring.
      Returns:
      CustomSheetPaymentInfo Builder.
      Since:
      API Level 1.3
    • setMerchantCountryCode

      public CustomSheetPaymentInfo.Builder setMerchantCountryCode(String merchantCountryCode)
      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

      public CustomSheetPaymentInfo.Builder setCustomSheet(CustomSheet customSheet)
      API to set customSheet.
      Parameters:
      customSheet - CustomSheet configured by merchant.
      Returns:
      CustomSheetPaymentInfo Builder.
      Since:
      API Level 1.3
    • setExtraPaymentInfo

      public CustomSheetPaymentInfo.Builder setExtraPaymentInfo(android.os.Bundle extraPaymentInfo)
      API to set the extra payment information data.
      Parameters:
      extraPaymentInfo - Extra PaymentInfo data.
      Returns:
      CustomSheetPaymentInfo Builder.
      Since:
      API Level 1.3
    • enableEnforcePaymentSheet

      public CustomSheetPaymentInfo.Builder 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

      public CustomSheetPaymentInfo.Builder setPaymentCardLast4DPAN(String last4digits)
      API to set the last 4 digits of DPAN for payment transaction.
      This API can be used with setPaymentCardBrand(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

      public CustomSheetPaymentInfo.Builder setPaymentCardLast4FPAN(String last4digits)
      API to set the last 4 digits of FPAN for payment transaction.
      This API can be used with setPaymentCardBrand(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

      public CustomSheetPaymentInfo.Builder setPaymentCardBrand(SpaySdk.Brand cardBrand)
      API to set the card brand for payment transaction.
      This API can be used with setPaymentCardLast4DPAN(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

      public CustomSheetPaymentInfo.Builder setPaymentShippingMethod(String shippingMethod)
      API to set the shipping method for payment transaction.
      Parameters:
      shippingMethod - Shipping method.
      Returns:
      CustomSheetPaymentInfo Builder.
      Since:
      API Level 1.7
    • build

      public CustomSheetPaymentInfo build()
      API to build CustomSheetPaymentInfo object.
      Returns:
      CustomSheetPaymentInfo object.
      Since:
      API Level 1.3