Class AddCardInfo
java.lang.Object
com.samsung.android.sdk.samsungpay.v2.card.AddCardInfo
- All Implemented Interfaces:
android.os.Parcelable
This class provides card information for enrollment.
- Since:
- API Level 1.2
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Key to represent issuer bin range.static final String
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.static final String
Key to represent encrypted blob from issuer on cardDetail bundle.static final String
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.static final String
Indicates that the card tokenization provider is AMEX.static final String
Indicates that the card tokenization provider is DISCOVER.static final String
Indicates that the card tokenization provider is GEMALTO.static final String
Indicates that the card tokenization provider is GIFT.static final String
Indicates that the card tokenization provider is LOYALTY.static final String
Indicates that the card tokenization provider is MASTERCARD.static final String
Indicates that the card tokenization provider is MIR.static final String
Indicates that the card tokenization provider is NAPAS.static final String
Indicates that the card tokenization provider is PagoBANCOMAT.static final String
Indicates that the card tokenization provider is PayPal.static final String
Indicates that the card tokenization provider is PLCC.static final String
Indicates that the card tokenization provider is VaccinePass.
referCardManager.addCard(AddCardInfo, AddCardListener)
in detail.static final String
Indicates that the card tokenization provider is VISA.Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
Constructor Summary
ConstructorDescriptionAddCardInfo
(String cardType, String tokenizationProvider, android.os.Bundle cardDetail) Constructor to create AddCardInfo instance. -
Method Summary
Modifier and TypeMethodDescriptionandroid.os.Bundle
API to get card details.API to get card type.API to get tokenization provider (example: VI, MC, AX, DS, and so on).void
setCardDetail
(android.os.Bundle cardDetail) API to set extra card details.void
setCardType
(String cardType) API to set card type.void
setTokenizationProvider
(String tokenizationProvider) API to set tokenization provider.
-
Field Details
-
EXTRA_PROVISION_PAYLOAD
Key to represent encrypted blob from issuer on cardDetail bundle.- Since:
- API Level 1.2
- See Also:
-
EXTRA_ISSUER_ID
Key to represent issuer bin range.- Since:
- API Level 1.2
- See Also:
-
PROVIDER_VISA
Indicates that the card tokenization provider is VISA.- Since:
- API Level 1.2
- See Also:
-
PROVIDER_MASTERCARD
Indicates that the card tokenization provider is MASTERCARD.- Since:
- API Level 1.2
- See Also:
-
PROVIDER_AMEX
Indicates that the card tokenization provider is AMEX.- Since:
- API Level 1.2
- See Also:
-
PROVIDER_DISCOVER
Indicates that the card tokenization provider is DISCOVER.- Since:
- API Level 1.2
- See Also:
-
PROVIDER_PLCC
Indicates that the card tokenization provider is PLCC.- Since:
- API Level 1.2
- See Also:
-
PROVIDER_GIFT
Indicates that the card tokenization provider is GIFT.- Since:
- API Level 1.2
- See Also:
-
PROVIDER_LOYALTY
Indicates that the card tokenization provider is LOYALTY.- Since:
- API Level 1.2
- See Also:
-
PROVIDER_PAYPAL
Indicates that the card tokenization provider is PayPal.- Since:
- API Level 2.0
- See Also:
-
PROVIDER_GEMALTO
Indicates that the card tokenization provider is GEMALTO.- Since:
- API Level 2.3
- See Also:
-
PROVIDER_NAPAS
Indicates that the card tokenization provider is NAPAS.- Since:
- API Level 2.3
- See Also:
-
PROVIDER_MIR
Indicates that the card tokenization provider is MIR.- Since:
- API Level 2.3
- See Also:
-
PROVIDER_PAGOBANCOMAT
Indicates that the card tokenization provider is PagoBANCOMAT.- Since:
- API Level 2.7
- See Also:
-
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
Indicates that the card tokenization provider is VaccinePass.
referCardManager.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
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 containEXTRA_PROVISION_PAYLOAD
NullPointerException
- If tokenizationProvider or cardDetail is null- Since:
- API Level 1.2
-
-
Method Details
-
setCardDetail
public void setCardDetail(android.os.Bundle cardDetail) API to set extra card details.- Parameters:
cardDetail
- Card detail which partner wants to pass to Samsung Pay.
Bundle key-value pairs are defined as follows:
Keys Values EXTRA_PROVISION_PAYLOAD
String provisionPayload - Throws:
NullPointerException
- If cardDetail is nullIllegalArgumentException
- If cardDetail does not containEXTRA_PROVISION_PAYLOAD
- Since:
- API Level 1.2
-
setTokenizationProvider
API to set tokenization provider.- Parameters:
tokenizationProvider
- Tokenization provider of the card.
Tokenization provider can be one of the following:
PROVIDER_VISA
PROVIDER_MASTERCARD
PROVIDER_AMEX
PROVIDER_DISCOVER
PROVIDER_GEMALTO
PROVIDER_PLCC
PROVIDER_GIFT
PROVIDER_LOYALTY
PROVIDER_PAYPAL
PROVIDER_NAPAS
PROVIDER_MIR
PROVIDER_PAGOBANCOMAT
- Throws:
NullPointerException
- If tokenization provider is null.- Since:
- API Level 1.2
-
setCardType
API to set card type.- Parameters:
cardType
- Card type to add.
Card type can be one of the following:
Card.CARD_TYPE_CREDIT_DEBIT
Card.CARD_TYPE_CREDIT
Card.CARD_TYPE_DEBIT
- Throws:
IllegalArgumentException
- If not allowed card type is used.- Since:
- API Level 1.2
-
getCardDetail
public android.os.Bundle getCardDetail()API to get card details.- Since:
- API Level 1.2
-
getTokenizationProvider
API to get tokenization provider (example: VI, MC, AX, DS, and so on).- Since:
- API Level 1.2
-
getCardType
API to get card type.- Since:
- API Level 1.2
-
Samsung Electronics.
Samsung Pay SDK 2.19.00 - Jun 12 2024