Class PartnerInfo

java.lang.Object
com.samsung.android.sdk.samsungpay.v2.PartnerInfo
All Implemented Interfaces:
android.os.Parcelable

public class PartnerInfo extends Object implements android.os.Parcelable
This class holds the partner information. Any third party application using the Samsung Pay SDK is considered as partner app.
The third party application can be an issuer app (bank app), merchant app, and so on.
Since:
API Level 1.1
  • Nested Class Summary

    Nested classes/interfaces inherited from interface android.os.Parcelable

    android.os.Parcelable.ClassLoaderCreator<T extends Object>, android.os.Parcelable.Creator<T extends Object>
  • Field Summary

    Fields inherited from interface android.os.Parcelable

    CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
  • Constructor Summary

    Constructors
    Constructor
    Description
    PartnerInfo(String serviceId)
    Constructor to create Partner Information.
    PartnerInfo(String serviceId, android.os.Bundle data)
    Constructor to create Partner Information.
  • Method Summary

    Modifier and Type
    Method
    Description
    android.os.Bundle
    API to get partner information extra.
    Extra data differs from partners.
    API to get service ID.
    void
    setData(android.os.Bundle data)
    API to set partner information extra.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PartnerInfo

      public PartnerInfo(String serviceId)
      Constructor to create Partner Information.
      Parameters:
      serviceId - Unique ID to represent the service. Partner should on-board with Samsung Pay Developers to receive this ID.
       
          // Set the serviceId which is assigned by the Samsung Pay Developer during on boarding.
          String serviceId = "sampleServiceId";
      
          PartnerInfo pInfo = new PartnerInfo(serviceId);
      
          // Partner must set proper service type - since API level 1.4.
          Bundle bundle = new Bundle();
          bundle.putString(SamsungPay.PARTNER_SERVICE_TYPE, SamsungPay.ServiceType.APP2APP.toString());
          pInfo.setData(bundle);
       
       
      Since:
      API Level 1.1
    • PartnerInfo

      public PartnerInfo(String serviceId, android.os.Bundle data)
      Constructor to create Partner Information.
      Parameters:
      serviceId - Unique ID to represent the service. Partner should on-board with Samsung Pay Developers to receive this ID.
      data - Extra data which partner wants to pass to Samsung Pay.
      If partner app integrates SDK v1.4.00 or higher, Service Type must be set in data bundle.
      Refer to the usage sample below. Extra data bundle key-value pairs are defined as follows:

      Keys Values
      SamsungPay#EXTRA_ISSUER_NAME String issuerName (issuerCode for Korean issuers)
      Issuer: mandatory. Merchant: not required.
      SamsungPay#PARTNER_SERVICE_TYPE String SamsungPay.ServiceType.ABC.toString() (since API level 1.4)
      This value is mandatory because it will be used to verify if the service type is allowed or not.
          // Set the serviceId which is assigned by the Samsung Pay Developer during on boarding.
          String serviceId = "sampleServiceId";
          String issuerName = "MyBank";
      
          Bundle bundle = new Bundle();
          // Set issuerName in case of issuers.
          bundle.putString(SamsungPay.EXTRA_ISSUER_NAME, issuerName);
      
          // Set service type - since API level 1.4.
          bundle.putString(SamsungPay.PARTNER_SERVICE_TYPE, SamsungPay.ServiceType.APP2APP.toString());
      
          PartnerInfo pInfo = new PartnerInfo(serviceId, bundle);
       
      Since:
      API Level 1.1
  • Method Details

    • getServiceId

      public String getServiceId()
      API to get service ID.
      Since API level 1.4, productId is replaced by serviceId.
      Returns:
      service ID
      Since:
      API Level 1.4
    • getData

      public android.os.Bundle getData()
      API to get partner information extra.
      Extra data differs from partners. For example, issuer app can set the SamsungPay#EXTRA_ISSUER_NAME with bundle.
      Returns:
      Extra data bundle passed to Samsung Pay.
      Since:
      API Level 1.1
    • setData

      public void setData(android.os.Bundle data)
      API to set partner information extra.
      Extra data differs from partners. For example, issuer app can set the SamsungPay#EXTRA_ISSUER_NAME with bundle.
      If partner app integrates SDK v1.4.00 or higher, SamsungPay#PARTNER_SERVICE_TYPE must be set in data bundle.
      Parameters:
      data - Extra data bundle passed to Samsung Pay.
      Since:
      API Level 1.1