Class AddCardInfo

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

public class AddCardInfo extends Object implements android.os.Parcelable
This class provides card information for enrollment.
Since:
API Level 1.2
  • Field Details

    • EXTRA_PROVISION_PAYLOAD

      public static final String EXTRA_PROVISION_PAYLOAD
      Key to represent encrypted blob from issuer on cardDetail bundle.
      Since:
      API Level 1.2
      See Also:
    • EXTRA_ISSUER_ID

      public static final String EXTRA_ISSUER_ID
      Key to represent issuer bin range.
      Since:
      API Level 1.2
      See Also:
    • PROVIDER_VISA

      public static final String PROVIDER_VISA
      Indicates that the card tokenization provider is VISA.
      Since:
      API Level 1.2
      See Also:
    • PROVIDER_MASTERCARD

      public static final String PROVIDER_MASTERCARD
      Indicates that the card tokenization provider is MASTERCARD.
      Since:
      API Level 1.2
      See Also:
    • PROVIDER_AMEX

      public static final String PROVIDER_AMEX
      Indicates that the card tokenization provider is AMEX.
      Since:
      API Level 1.2
      See Also:
    • PROVIDER_DISCOVER

      public static final String PROVIDER_DISCOVER
      Indicates that the card tokenization provider is DISCOVER.
      Since:
      API Level 1.2
      See Also:
    • PROVIDER_PLCC

      public static final String PROVIDER_PLCC
      Indicates that the card tokenization provider is PLCC.
      Since:
      API Level 1.2
      See Also:
    • PROVIDER_GIFT

      public static final String PROVIDER_GIFT
      Indicates that the card tokenization provider is GIFT.
      Since:
      API Level 1.2
      See Also:
    • PROVIDER_LOYALTY

      public static final String PROVIDER_LOYALTY
      Indicates that the card tokenization provider is LOYALTY.
      Since:
      API Level 1.2
      See Also:
    • PROVIDER_PAYPAL

      public static final String PROVIDER_PAYPAL
      Indicates that the card tokenization provider is PayPal.
      Since:
      API Level 2.0
      See Also:
    • PROVIDER_GEMALTO

      public static final String PROVIDER_GEMALTO
      Indicates that the card tokenization provider is GEMALTO.
      Since:
      API Level 2.3
      See Also:
    • PROVIDER_NAPAS

      public static final String PROVIDER_NAPAS
      Indicates that the card tokenization provider is NAPAS.
      Since:
      API Level 2.3
      See Also:
    • PROVIDER_MIR

      public static final String PROVIDER_MIR
      Indicates that the card tokenization provider is MIR.
      Since:
      API Level 2.3
      See Also:
    • PROVIDER_PAGOBANCOMAT

      public static final String PROVIDER_PAGOBANCOMAT
      Indicates that the card tokenization provider is PagoBANCOMAT.
      Since:
      API Level 2.7
      See Also:
    • EXTRA_SAMSUNG_PAY_CARD

      public static final String EXTRA_SAMSUNG_PAY_CARD
      Key to represent a Samsung Pay Card for push provisioning.
      If the key value is true, the current push provisioning card will have a Samsung Pay Card type in Samsung Pay application.
      This is only for specific issuer in UK.
      Since:
      API Level 2.14
      See Also:
    • PROVIDER_VACCINE_PASS

      public static final String PROVIDER_VACCINE_PASS
      Indicates that the card tokenization provider is VaccinePass.
      refer CardManager.addCard(AddCardInfo, AddCardListener) in detail.
       
          CardManager cardManager = new CardManager(ct, pInfo);
      
          String cardType = Card.CARD_TYPE_VACCINE_PASS;
          String tokenizationProvider = AddCardInfo.PROVIDER_VACCINE_PASS;
      
          String payload = "Please follow JSON object specification";
      
          Bundle cardDetail = new Bundle();
          cardDetail.putString(AddCardInfo.EXTRA_PROVISION_PAYLOAD, payload);
      
          AddCardInfo addCardInfo = new AddCardInfo(cardType, tokenizationProvider, cardDetail);
      
          cardManager.addCard(addCardInfo, new AddCardListener() {
              @Override
              public void onSuccess(int status, Card card) {
                  Log.d(TAG, "onSuccess callback is called");
              }
      
              @Override
              public void onFail(int errorCode, Bundle errorData ) {
                  Log.e(TAG, "onFail callback is called, errorCode: " + errorCode);
                  if (errorData != null && errorData.containsKey(SpaySdk.EXTRA_ERROR_REASON_MESSAGE)) {
                      Log.e(TAG, "onFail extra reason message: " + errorData.getString(SpaySdk.EXTRA_ERROR_REASON_MESSAGE));
                  }
              }
      
              @Override
              public void onProgress(int currentCount, int totalCount, Bundle bundleData) {
                  Log.d(TAG,"onProgress callback is called : " + currentCount + " / " + totalCount);
              }
          });
       
       


      Json Object Specification
      Mandatory fields: version, cardId, type, cardArt, qrData, decoding, chunks, chunk, provider.name, patient.name, vaccine.product, vaccine.date, performer
      {
      "version": "1.0",
      "cardId": "xxxx-xxxxx-xxxxxxxxx",
      "type": "VaccinationRecordCard",
      "cardArt": "https://issuer.logo.url.location/logo.png",
      "qrData" : {
      "decoding": "None",
      "chunks": [
      "shc:/012345678901234567890123456789"
      ]
      },
      "expirationDate": "20231011",
      "provider": {
      "name": "Vaccine Pass Provider Name"
      },
      "issuer": {
      "name": "Vaccine Pass Issuer Name"
      },
      "patient": {
      "dateOfBirth": "19510120",
      "name": {
      "family": "Anyperson",
      "given": "John B."
      }
      },
      "vaccinations": [
      {
      "vaccine": {
      "product": "Moderna",
      "lot": "0000001",
      "date": "20210101"
      },
      "performer": {
      "name": "ABC General Hospital",
      "identityAssuranceLevel": "IAL1.2"
      }
      },
      {
      "vaccine": {
      "product": "Moderna",
      "lot": "0000007",
      "date": "20210129"
      },
      "performer": {
      "name": "ABC General Hospital",
      "identityAssuranceLevel": "IAL1.2"
      }
      }
      ]
      }
      Since:
      API Level 2.18
      See Also:
    • EXTRA_KEY_MOSCOW_TRANSIT

      public static final String EXTRA_KEY_MOSCOW_TRANSIT
      Key to send extra transit card data to Samsung Pay for Russia Virtual Troika project.
      The format of the data should be JSON string object.
      Since:
      API Level 2.17
      See Also:
  • Constructor Details

    • AddCardInfo

      public AddCardInfo(@NonNull String cardType, @NonNull String tokenizationProvider, @NonNull android.os.Bundle cardDetail)
      Constructor to create AddCardInfo instance.
      Parameters:
      cardType - Card type to add.
      tokenizationProvider - Tokenization provider of the card.
      cardDetail - Card detail which partner wants to pass to Samsung Pay.
      Throws:
      IllegalArgumentException - If not allowed card type is used. Or cardDetail does not contain EXTRA_PROVISION_PAYLOAD
      NullPointerException - If tokenizationProvider or cardDetail is null
      Since:
      API Level 1.2
  • Method Details