SpaySdk class
This class allows to define Samsung Pay SDK information, common error codes, and constants.
Constructors
- SpaySdk()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- COMMON_STATUS_TABLE → const String
-
This table shows the status codes used commonly.
- CRYPTOGRAM_TYPE_ICC → const String
- Key to represent the ICC cryptogram type of Mastercard.
- CRYPTOGRAM_TYPE_UCAF → const String
- Key to represent the UCAF cryptogram type of Mastercard.
- CUSTOM_MESSAGE → const int
- DEVICE_ID → const String
- Key to represent unique device ID.
- DEVICE_TYPE_GEAR → const String
- Device type is Gear.
- DEVICE_TYPE_PHONE → const String
- Device type is phone.
- DISPLAY_OPTION_ADDRESS → const int
- DISPLAY_OPTION_ADDRESSEE → const int
- DISPLAY_OPTION_EMAIL → const int
- DISPLAY_OPTION_PHONE_NUMBER → const int
- ERROR_ALREADY_DONE → const int
-
This error indicates that requested operation is already done.
For example, adding a card to Samsung Wallet but the card is already added either via Samsung Wallet or issuer app. - ERROR_ANDROID_PLATFORM_CHECK_FAIL → const int
-
This error indicates that Android platform version check has failed.
For in-app Payment, the Samsung Pay SDK requires Android 6.0(M) (Android API level 23) or later versions of the Android OS.
This is returned as EXTRA_ERROR_REASON for SPAY_NOT_SUPPORTED error.
Since API Level 1.5 - ERROR_BILLING_ADDRESS_INVALID → const int
- ERROR_BILLING_ADDRESS_NOT_EXIST → const int
- ERROR_DEVICE_INTEGRITY_CHECK_FAIL → const int
-
This error indicates that device integrity check has failed.
This is returned as EXTRA_ERROR_REASON for SPAY_NOT_SUPPORTED error.
- ERROR_DEVICE_NOT_SAMSUNG → const int
-
This error indicates that the device is not a Samsung device.
This is returned as EXTRA_ERROR_REASON for SPAY_NOT_SUPPORTED error.
- ERROR_DUPLICATED_SDK_API_CALLED → const int
-
This error indicates that duplicate API called by Partner.
- ERROR_EXPIRED_OR_INVALID_DEBUG_KEY → const int
-
This error indicates that debug key is invalid or expired.
This is returned as EXTRA_ERROR_REASON for ERROR_NOT_ALLOWED error.
For example, if the partner app uses expired debug-api-key, then the partner app verification will be failed. - ERROR_INITIATION_FAIL → const int
-
This error indicates that session initiation or service binding has failed.
For example, if the service connection with Samsung Pay was not successful. - ERROR_INVALID_INPUT → const int
- This error indicates that the given input is invalid.
- ERROR_INVALID_PARAMETER → const int
- This error indicates that requested operation contains invalid parameter or invalid bundle key/value.
- ERROR_MISSING_INFORMATION → const int
-
This error indicates that some information of partner is missing.
This error code is returned as an EXTRA_ERROR_REASON of ERROR_NOT_ALLOWED error.
For example, if the partner app does not deliver a required information to Samsung Pay to get the wallet information, then Samsung Pay will send this error to partner app.
Also if the partner does not define the issuer name in Samsung Pay Developer portal, Samsung Pay will send this error to partner app.
- ERROR_NO_NETWORK → const int
-
This error indicates that Samsung Pay is unable to connect to the server since there is no network.
For example, partner app tries to verify with server while network is not connected. - ERROR_NONE → const int
- This error indicates that requested operation is success with no error.
- ERROR_NOT_ALLOWED → const int
-
This error indicates that requested operation is not allowed.
For example, partner app verification has failed in Samsung Pay server. - ERROR_NOT_FOUND → const int
- This error indicates that given card ID is not found in Samsung Pay.
- ERROR_NOT_SUPPORTED → const int
- This error indicates that requested operation is not supported in Samsung Pay.
- ERROR_PARTNER_APP_BLOCKED → const int
-
This error indicates that partner app version is removed/blocked by the Samsung Pay Developers.
This is returned as EXTRA_ERROR_REASON for ERROR_NOT_ALLOWED error.
For example, if the partner app is blocked, then the partner app verification will be failed. - ERROR_PARTNER_APP_NEED_TO_UPDATE → const int
-
This error indicates that the partner app should be updated.
This is returned as EXTRA_ERROR_REASON for SPAY_NOT_READY error.
- ERROR_PARTNER_APP_SIGNATURE_MISMATCH → const int
-
This error indicates that the app signature is different from the one registered from Samsung Pay Developers.
This is returned as EXTRA_ERROR_REASON for ERROR_NOT_ALLOWED error.
For example, if different signature is used for signing apk, the partner app verification will be failed.
Checking signature logic will be activated in case debug mode is "N". - ERROR_PARTNER_APP_VERSION_NOT_SUPPORTED → const int
-
This error indicates that app version is not supported by Samsung Pay.
This is returned as EXTRA_ERROR_REASON for ERROR_NOT_ALLOWED error.
For example, if the version registered from developer portal is higher than current version(or no any version registered), then the partner app verification will be failed.
- ERROR_PARTNER_INFO_INVALID → const int
-
This error indicates that partner information is invalid.
For example, partner app is using SDK version not allowed, invalid service type, wrong api level, and so on. - ERROR_PARTNER_NOT_APPROVED → const int
-
This error indicates that partner registration is not done on the Samsung Pay Developers.
This is returned as EXTRA_ERROR_REASON for ERROR_NOT_ALLOWED error.
For example, if the partner app is submitted but not approved, then the partner app verification will be failed. - ERROR_PARTNER_SDK_API_LEVEL → const int
-
This error indicates that SDK API level is missing or invalid.
Partner must set valid API level in the AndroidManifest file. Minimum possible version is 1.4.
Also if the Partner set the values defined in higher API level, Samsung Pay will send this error to partner app.
This is returned as EXTRA_ERROR_REASON for ERROR_PARTNER_INFO_INVALID error.
- ERROR_PARTNER_SDK_VERSION_NOT_ALLOWED → const int
-
This error indicates that the partner app is using Samsung Pay SDK not allowed.
This is returned as EXTRA_ERROR_REASON for ERROR_PARTNER_INFO_INVALID error.
- ERROR_PARTNER_SERVICE_TYPE → const int
-
This error indicates that the Service Type is invalid.
Partner must set valid Service Type in PartnerInfo when calling APIs.
This is returned as EXTRA_ERROR_REASON for SPAY_NOT_READY error.
- ERROR_PRODUCT_BLOCKED → const int
-
This error indicates that product version is removed/blocked by the Samsung Pay Developers.
This is returned as EXTRA_ERROR_REASON for ERROR_NOT_ALLOWED error.
For example, if the partner app is blocked, then the partner app verification will be failed. Deprecated use ERROR_SERVICE_BLOCKED instead - ERROR_PRODUCT_ID_INVALID → const int
-
This error indicates that product ID is not registered with the Samsung Pay Developers.
This is returned as EXTRA_ERROR_REASON for ERROR_NOT_ALLOWED error.
For example, if invalid product ID was used in partner app, then the partner app verification will be failed. Deprecated use ERROR_SERVICE_ID_INVALID instead - ERROR_PRODUCT_NOT_APPROVED_FOR_RELEASE → const int
-
This error indicates that product version is not approved for release by the Samsung Pay Developers.
This is returned as EXTRA_ERROR_REASON for ERROR_NOT_ALLOWED error.
For example, if the partner app is not registered for release mode, then the partner app verification will be failed. Deprecated use ERROR_SERVICE_NOT_APPROVED_FOR_RELEASE - ERROR_PRODUCT_NOT_VERIFIED_WITH_PARTNER → const int
-
This error indicates that product and product ID does not match on the Samsung Pay Developers.
This is returned as EXTRA_ERROR_REASON for ERROR_NOT_ALLOWED error.
For example, if the registered partner app information is not matched with product ID, then the partner app verification will be failed. Deprecated use ERROR_SERVICE_NOT_VERIFIED_WITH_PARTNER instead - ERROR_PRODUCT_UNAVAILABLE_FOR_THIS_REGION → const int
- This error indicates that SDK support is not available for partner's product in particular region. Deprecated use ERROR_SERVICE_UNAVAILABLE_FOR_THIS_REGION instead
- ERROR_PRODUCT_VERSION_NOT_SUPPORTED → const int
-
This error indicates that product version is not supported by Samsung Pay.
This is returned as EXTRA_ERROR_REASON for ERROR_NOT_ALLOWED error.
For example, if the version is not registered, then the partner app verification will be failed. Deprecated use ERROR_SERVICE_VERSION_NOT_SUPPORTED instead - ERROR_REGISTRATION_FAIL → const int
-
This error indicates that the card provisioning has failed.
- ERROR_SDK_NOT_SUPPORTED_FOR_THIS_REGION → const int
-
This error indicates that the Samsung Pay SDK is not supported in particular region.
This is returned as EXTRA_ERROR_REASON for ERROR_NOT_ALLOWED error.
For example, if the device is from the country that Samsung Pay SDK is not supported, then the partner app verification will be failed.
- ERROR_SERVER_INTERNAL → const int
-
This error indicates that server fails to proceed request due to unknown internal error.
This is returned as EXTRA_ERROR_REASON for ERROR_SPAY_INTERNAL error.
For example, if the server error occurred while the partner verification is going on, then the partner app verification will be failed. - ERROR_SERVER_NO_RESPONSE → const int
-
This error indicates that server did not respond to the Samsung Pay request.
- ERROR_SERVICE_BLOCKED → const int
-
This error indicates that service version is removed/blocked by the Samsung Pay Developers.
This is returned as EXTRA_ERROR_REASON for ERROR_NOT_ALLOWED error.
For example, if the partner app is blocked, then the partner app verification will be failed. - ERROR_SERVICE_ID_INVALID → const int
-
This error indicates that service ID is not registered with the Samsung Pay Developers.
This is returned as EXTRA_ERROR_REASON for ERROR_NOT_ALLOWED error.
For example, if invalid service ID was used in partner app, then the partner app verification will be failed. - ERROR_SERVICE_NOT_APPROVED_FOR_RELEASE → const int
-
This error indicates that service version is not approved for release by the Samsung Pay Developers.
This is returned as EXTRA_ERROR_REASON for ERROR_NOT_ALLOWED error.
For example, if the partner app is not registered for release mode, then the partner app verification will be failed. - ERROR_SERVICE_NOT_VERIFIED_WITH_PARTNER → const int
-
This error indicates that service and service ID does not match on the Samsung Pay Developers.
This is returned as EXTRA_ERROR_REASON for ERROR_NOT_ALLOWED error.
For example, if the registered partner app information is not matched with service ID, then the partner app verification will be failed. - ERROR_SERVICE_UNAVAILABLE_FOR_THIS_REGION → const int
- This error indicates that SDK support is not available for partner's service in particular region.
- ERROR_SERVICE_VERSION_NOT_SUPPORTED → const int
-
This error indicates that service version is not supported by Samsung Pay.
This is returned as EXTRA_ERROR_REASON for ERROR_NOT_ALLOWED error.
For example, if the version is not registered, then the partner app verification will be failed. - ERROR_SHIPPING_ADDRESS_INVALID → const int
- ERROR_SHIPPING_ADDRESS_NOT_EXIST → const int
- ERROR_SHIPPING_ADDRESS_UNABLE_TO_SHIP → const int
- ERROR_SHORT_INFORMATION → const int
-
This error indicates that some information by partner is shorter than expected.
This is returned as EXTRA_ERROR_REASON for ERROR_NOT_ALLOWED error.
For example, if the partner app does not deliver some information to Samsung Pay to get the wallet information, then Samsung Pay will send this error to partner app.
Also if the partner does not define issuer name on Samsung Pay Developers, then Samsung Pay will send this error to partner app. Deprecated use ERROR_MISSING_INFORMATION instead. - ERROR_SPAY_APP_INTEGRITY_CHECK_FAIL → const int
-
This error indicates that Samsung Wallet app integrity check has failed.
This is returned as EXTRA_ERROR_REASON for SPAY_NOT_SUPPORTED error.
- ERROR_SPAY_APP_NEED_TO_UPDATE → const int
-
This error indicates that the Samsung Pay should be updated.
Partner app need to ask user to update Samsung Wallet app. If user agrees, callgoToUpdatePage()API.
This is returned as EXTRA_ERROR_REASON for SPAY_NOT_READY error.
- ERROR_SPAY_CONNECTED_WITH_EXTERNAL_DISPLAY → const int
-
This error indicates that device is connected with an external display.
Due to security reason, Samsung Pay cannot be launched at this moment.
In this case, partner can guide user to disconnect any external display if connected.
- ERROR_SPAY_FMM_LOCK → const int
-
This error indicates that device is locked due to FMM(Find My Mobile).
Partner app needs to ask user to unlock the Samsung Wallet app. If user agrees, callactivateSamsungPay()to unlock the Samsung Pay app.
- ERROR_SPAY_INTERNAL → const int
- his error indicates that internal error has occurred while the requested operation is going on.
- ERROR_SPAY_PKG_NOT_FOUND → const int
-
This error indicates that the Samsung Wallet application is not on the device.
This is returned as EXTRA_ERROR_REASON for SPAY_NOT_SUPPORTED error.
This could mean that the device does not support Samsung Pay. - ERROR_SPAY_SDK_SERVICE_NOT_AVAILABLE → const int
-
This error indicates that SDK service is not available on this device.
This is returned as EXTRA_ERROR_REASON for SPAY_NOT_SUPPORTED error.
- ERROR_SPAY_SETUP_NOT_COMPLETED → const int
-
This error indicates that the Samsung Pay setup was not completed.
Partner app need to ask user to set up Samsung Wallet app. If user agrees, call SamsungPaySdkFlutter.activateSamsungPay API .
This is returned as EXTRA_ERROR_REASON for SPAY_NOT_READY error.
- ERROR_UNABLE_TO_VERIFY_CALLER → const int
-
This error indicates that Samsung Pay is unable to verify partner app at this moment.
This is returned as EXTRA_ERROR_REASON for ERROR_NOT_ALLOWED error.
For example, Samsung Pay tried to connect to the server and validate partner ID, but the device does not have the network connectivity. - ERROR_UNAUTHORIZED_REQUEST_TYPE → const int
-
This error indicates that the partner is not authorized for this request type such as payment or enrollment.
This is returned as EXTRA_ERROR_REASON for ERROR_NOT_ALLOWED error.
For example, if the merchant app calls enrollment API, then the partner app verification will be failed. - ERROR_USER_CANCELED → const int
-
This error indicates that user has cancelled before completing the requested operation.
For example, user taps the cancel or back key on the payment sheet. - ERROR_USER_NOT_REGISTERED_FOR_DEBUG → const int
-
This error indicates that user account is not registered for using debug mode on the Samsung Pay Developers.
This is returned as EXTRA_ERROR_REASON for ERROR_NOT_ALLOWED error.
For example, if the partner app is in debug mode but the Samsung Account is not registered for the debug-api-key, then the partner app verification will be failed. - EXTRA_ACCEPT_COMBO_CARD → const String
-
Key to represent that a merchant accepts combo card.
- EXTRA_CARD_BRAND → const String
-
Key to represent card brand.
Since API Level 1.7 - EXTRA_CARD_TYPE → const String
-
Key to represent card type.
The possible values are:
WalletCard.CARD_TYPE_CREDIT_DEBIT
WalletCard.CARD_TYPE_CREDIT
WalletCard.CARD_TYPE_DEBIT
WalletCard.CARD_TYPE_GIFT
WalletCard.CARD_TYPE_LOYALTY
WalletCard.CARD_TYPE_TRANSIT
- EXTRA_COUNTRY_CODE → const String
-
Key to represent country code.
Device Country code(ISO 3166-1 alpha-2) - EXTRA_CPF_HOLDER_NAME → const String
-
Key to get CPF holder name in extra payment data.
- EXTRA_CPF_NUMBER → const String
-
Key to get CPF number in extra payment data.
- EXTRA_CRYPTOGRAM_TYPE → const String
- Key to represent the DSRP (Digital Secure Remote Payments) cryptogram type of Mastercard.
- EXTRA_DEVICE_CARD_LIMIT_REACHED → const String
- Key to represent the maximum registered card number has reached or not.
- EXTRA_DEVICE_TYPE → const String
-
Key to represent type of the device (Mobile or Gear).
The possible values are:
SpaySdk.DEVICE_TYPE_PHONE
SpaySdk.DEVICE_TYPE_GEAR
Since API Level 1.1 - EXTRA_ERROR_REASON → const String
- Key to represent extra error reasons.
- EXTRA_ERROR_REASON_MESSAGE → const String
- Key to represent extra error reason messages.
- EXTRA_IS_DEFAULT_CARD → const String
- Card set as default card on Samsung Pay for payment.
- EXTRA_ISSUER_NAME → const String
-
Key to represent name of the issuer.
This key can be used in the bundle forPartnerInfo.PartnerInfo. - EXTRA_ISSUER_NAMES → const String
-
Key to represent names of the issuer from OPM server.
- EXTRA_ISSUER_PKGNAME → const String
- Key to represent package name of the issuer app on Android.
- EXTRA_KEY_CARD_BRAND_FILTER → const String
-
Key to represent request card filter list.
Partner can use this key to put filter into bundle for requestCardInfo - EXTRA_LAST4_DPAN → const String
- Key to represent the last four digits of digitalized Personal Identification Number (DPAN).
- EXTRA_LAST4_FPAN → const String
- Key to represent the last four digits of funding Personal Identification Number (FPAN).
- EXTRA_MEMBER_ID → const String
-
Key to represent member ID of the issuer.
This is for Korean issuers only. - EXTRA_MERCHANT_REF_ID → const String
-
Key to set/get merchant reference ID beyond marketplace app or service(i.e. Bixby).
- EXTRA_PARTNER_BINDER → const String
- EXTRA_PARTNER_NAME → const String
-
Key to represent name of the partner app.
This key can be used in the bundle forPartnerInfo.PartnerInfo. - EXTRA_REQUEST_ID → const String
-
Key to represent request id.
- EXTRA_REQUIRE_CPF → const String
-
Key to represent that a partner requires CPF.
- EXTRA_RESOLVED_1 → const String
-
Key to represent additional data.
- EXTRA_RESOLVED_2 → const String
-
Key to represent additional data.
- EXTRA_RESOLVED_3 → const String
-
Key to represent additional data.
- EXTRA_RESOLVED_4 → const String
-
Key to represent additional data.
- EXTRA_RESOLVED_5 → const String
-
Key to represent additional data.
- EXTRA_RESOLVED_6 → const String
-
Key to represent additional data.
- EXTRA_RESOLVED_7 → const String
-
Key to represent additional data.
- EXTRA_SHIPPING_METHOD → const String
- EXTRA_SUPPORT_COMBO_CARD → const String
-
Key to represent that a merchant supports combo card.
- FORMAT_TOTAL_AMOUNT_PENDING → const String
- FORMAT_TOTAL_AMOUNT_PENDING_TEXT_ONLY → const String
- FORMAT_TOTAL_ESTIMATED_AMOUNT → const String
- FORMAT_TOTAL_ESTIMATED_CHARGE → const String
- FORMAT_TOTAL_ESTIMATED_FARE → const String
- FORMAT_TOTAL_FREE_TEXT_ONLY → const String
- FORMAT_TOTAL_PENDING → const String
- FORMAT_TOTAL_PENDING_TEXT_ONLY → const String
- FORMAT_TOTAL_PRICE_ONLY → const String
- FORMAT_TOTAL_UP_TO_AMOUNT → const String
- PARTNER_SDK_API_LEVEL → const String
- Key to represent unique SDK API Level which Partner use.
- PARTNER_SERVICE_TYPE → const String
-
Key to represent unique Service Type.
This key must be set in the bundle forPartnerInfo.PartnerInfo. - SPAY_HAS_NO_TRANSIT_CARD → const int
- This code is returned if Samsung Pay doesn't have a registered transit card This is for Korean issuers only.
- SPAY_HAS_TRANSIT_CARD → const int
-
This code is returned if Samsung Pay has a registered transit card.
This is for Korean issuers only. - SPAY_NOT_ALLOWED_TEMPORALLY → const int
-
Samsung Pay is not allowed temporally.
Refer extra reason delivered with EXTRA_ERROR_REASON.
- SPAY_NOT_READY → const int
-
Samsung Pay is not completely activated.
Usually, this status code is returned if the user did not complete the mandatory update or if the user is not signed in with the Samsung Account yet.
In this case, partner app can callactivateSamsungPay()API to launch Samsung Pay or can callgoToUpdatePage()API to update Samsung Wallet app. - SPAY_NOT_SUPPORTED → const int
-
Samsung Pay is not supported on this device.
Usually, this status code is returned if the device is not compatible to run Samsung Pay or if the Samsung Pay app is not installed. - SPAY_READY → const int
-
Samsung Pay is activated and ready to use.
Usually, this status code is returned after user completes all the mandatory updates and is signed in. - WALLET_DM_ID → const String
- Key to represent unique device management ID.
- WALLET_PROVIDER_ID → const String
-
Key to represent wallet provider ID.
This ID can be assigned by TSP during on-boarding process. - WALLET_USER_ID → const String
- Key to represent user's wallet ID.
- WEB_CHECKOUT_API_LEVEL → const String
- key to represent web checkout API level