Filter
-
Content Type
-
Category
Mobile/Wearable
Visual Display
Digital Appliance
Platform
Recommendations
Filter
Develop Samsung Pay
docfaq & troubleshooting if the samsung pay app throws error_not_allowed -6 / error_unable_to_verify_caller -359 , what needs to be checked on the partner app side? for debug verify that debug_mode is set as y in your android manifest verify that your spay_debug_api_key is valid in android manifest go to the samsung pay developers portal, sign in, and open your service details to check/retrieve the correct debug api key verify that your spay_debug_api_key has not expired verify that the serviceid is correct; make sure it was generated for the test mode and not for release verify that the servicetype is correct; make sure it is same as the value assigned by the samsung pay developers portal when you create the service verify that the device’s samsung account is registered allowed under test accounts in the service details for release verify that debug_mode is set as n in your android manifest verify that spay_debug_api_key is not defined in your android manifest it must be an empty string or "" verify that the serviceid is correct; make sure it was generated for release and not for the test mode verify that the servicetype is correct; make sure it is same as the value assigned by the samsung pay developers portal when you create the service ask your samsung pay relationship manager rm to confirm that the status of your service is approved i received an onsuccess callback for a `getallcards ` response but the card list is empty even though there already one or more installed cards in samsungpay one of the most common exceptions during development is that “getallcard ” returns an empty list even though the card has already been added to the samsung wallet the main reason for this exception is the mismatch of an issuer name with the samsung pay portal the issuer name on the samsung pay portal and the actual issuer name of the card must be the same to overcome this problem if you cannot confirm the actual issuer name of the card, just add the card to samsung wallet app and see its details information open wallet app > tap on the card > three-dot menu > customer service option > under the title you will find the issuer name the following screenshot would be helpful for better understanding, i have received an onfail callback for `getsamsungpaystatus ` with a `spay_not_supported` status code if your app’s target api level is set to 30 or higher, refer to setting up your sdk development environmen part and follow guide for android r os targetsdkversion 30
Learn Code Lab
codelabtransfer erc20 token with blockchain app objective develop a decentralized application dapp to transfer erc20 tokens between ethereum accounts using samsung blockchain platform sdk overview blockchain technology has been creating a significant impact in multiple sectors, such as banking, cybersecurity, and supply chain management it is widely used as a means of secure payment between different parties samsung blockchain platform sdk brings developers and consumers to the blockchain world by providing a complete set of functions that the decentralized app dapp or blockchain app needs ethereum is a decentralized blockchain network where you can perform transactions using its native currency, ether, and token you can interact with the network through simple api calls provided by the sdk for detailed information, see samsung blockchain platform sdk set up your environment you will need the following java se development kit 8 or later android studio latest version recommended samsung galaxy device that supports samsung blockchain sample code here is a sample code for you to start coding in this code lab download it and start your learning experience! token transaction sample code 2 73 mb enable developer mode to activate developer mode on your mobile device, follow the steps below navigate through settings > biometrics and security > samsung blockchain keystore and click about blockchain keystore tap the samsung blockchain keystore app name quickly, ten times or more if succeeded, developer mode will show start your project after downloading the sample code containing the project files, in android studio, click open to open the existing project locate the downloaded android project codelab-send-token-transaction-blank-code from the directory and click ok noteuser interface ui resources are already included in the provided project simply apply the code in the next steps in this code lab moreover, going through the sdk document is recommended initialize the instance since sblockchain is the initial base class of the samsung blockchain platform sdk, the first thing you need to do is create an sblockchain instance along with that, create the following in sendtokenfragment java hardwarewalletmanager for wallet operations accountmanager for account operations ethereumservice for transactions msblockchain = new sblockchain ; try { msblockchain initialize mcontext ; } catch ssdkunsupportedexception e { e printstacktrace ; } maccountmanager = msblockchain getaccountmanager ; mhardwarewalletmanager = msblockchain gethardwarewalletmanager ; mcoinnetworkinfo = new coinnetworkinfo cointype eth, ethereumnetworktype goerli, rpcurl ; mcoinservice = coinservicefactory getcoinservice getcontext , mcoinnetworkinfo ; ethereumservice = ethereumservice mcoinservice; connecttohardwarewallet ; connect to samsung blockchain keystore connect the app to the hardware wallet, which, in this case, is the samsung blockchain keystore you can get a hardware wallet instance from hardwarewalletmanager if you want to reset the wallet, set the second parameter of connect api to true otherwise, set it to false mhardwarewalletmanager connect hardwarewallettype samsung, false setcallback new listenablefuturetask callback<hardwarewallet> { @override public void onsuccess hardwarewallet hardwarewallet { handler post new runnable { @override public void run { log i tag, "hardwarewallet is connected " ; mprogressbar setvisibility view invisible ; getaccount ; } } ; } @override public void onfailure @nonnull executionexception e { mprogressbar setvisibility view invisible ; log e tag, "hardwarewallet connection failed " + e ; } @override public void oncancelled @nonnull interruptedexception e { mprogressbar setvisibility view invisible ; log e tag, "hardwarewallet connection cancelled " + e ; } } ; generate new account samsung blockchain platform sdk manages the address on blockchain as an account it contains the information required for signing and the blockchain address accountmanager provides apis dedicated for fetching, creating, and restoring accounts use generatenewaccount api for the creation of a new ethereum account upon clicking the create account button in the app hardwarewallet connectedhardwarewallet = mhardwarewalletmanager getconnectedhardwarewallet ; maccountmanager generatenewaccount connectedhardwarewallet, mcoinnetworkinfo setcallback new listenablefuturetask callback<account> { @override public void onsuccess account account { mprogressbar setvisibility view invisible ; log i tag, "generate new account successful " + account ; handler post new runnable { @override public void run { getaccount ; } } ; } @override public void onfailure @nonnull executionexception e { mprogressbar setvisibility view invisible ; log e tag, "generate new account failed " + e ; } @override public void oncancelled @nonnull interruptedexception e { mprogressbar setvisibility view invisible ; log e tag, "generate new account cancelled " + e ; } } ; after creating a new account, call the getaccounts api to get the account list if you already have an account, the textview will show the account's address and the create account button will be disabled in the app accounts = maccountmanager getaccounts null, cointype eth, ethereumnetworktype goerli ; if !accounts isempty { methereumaccount = ethereumaccount accounts get accounts size - 1 ; showaccounttextview settext methereumaccount getaddress ; generateaccountbutton setenabled false ; } create a token account to perform a token transaction, add the token address with the corresponding ethereum account and create a token account by calling the addtokenaddress api use the generated token account to perform token-related actions an ethereum account can add one or more tokens ethereumservice addtokenaddress methereumaccount, tokenaddress setcallback new listenablefuturetask callback<ethereumaccount> { @override public void onsuccess ethereumaccount ethereumaccount { mprogressbar setvisibility view invisible ; log i tag, "add token successful " + ethereumaccount ; handler post new runnable { @override public void run { toast maketext getcontext , "add token successful", toast length_short show ; } } ; } @override public void onfailure @nonnull executionexception e { mprogressbar setvisibility view invisible ; log e tag, "add token failed " + e ; } @override public void oncancelled @nonnull interruptedexception e { mprogressbar setvisibility view invisible ; log e tag, "add token cancelled " + e ; } } ; get token balance fetch the balance of the added token using gettokenbalance api ethereumservice gettokenbalance mtokenaccount, ethereumblockparameter latest setcallback new listenablefuturetask callback<biginteger> { @override public void onsuccess biginteger biginteger { mprogressbar setvisibility view invisible ; bigdecimal tokendecimal = bigdecimal ten pow 18 ; bigdecimal balance = new bigdecimal biginteger divide tokendecimal ; log d tag, "gettokenbalance success " + balance ; handler post new runnable { @override public void run { tokenbalance settext balance tostring ; } } ; } @override public void onfailure @nonnull executionexception e { mprogressbar setvisibility view invisible ; log e tag, "gettokenbalance failed " + e ; } @override public void oncancelled @nonnull interruptedexception e { mprogressbar setvisibility view invisible ; log e tag, "gettokenbalance cancelled " + e ; } } ; transfer token to transfer tokens between accounts, set the receiver address and the amount of tokens to send the trusted ui of the samsung blockchain keystore hardware wallet appears upon pressing the send button in the app, showing all the information regarding the transaction for confirmation generate a transaction hash upon confirmation of the transaction ethereumservice sendtokentransaction mhardwarewalletmanager getconnectedhardwarewallet , mtokenaccount, mtoaddress, tokenaddress, maxpriorityfee, methereumfeeinfo getestimatedbasefee add maxpriorityfee , mgaslimit, msendtokenamount, null setcallback new listenablefuturetask callback<transactionresult> { @override public void onsuccess transactionresult transactionresult { mprogressbar setvisibility view invisible ; log i tag, "send token successful " + transactionresult gethash ; handler post new runnable { @override public void run { toast maketext getcontext , "transaction hash " + transactionresult gethash , toast length_short show ; } } ; } @override public void onfailure @nonnull executionexception e { mprogressbar setvisibility view invisible ; log e tag, "send token failed " + e ; } @override public void oncancelled @nonnull interruptedexception e { mprogressbar setvisibility view invisible ; log i tag, "send token cancelled " + e ; } } ; run the app after building the apk, follow the steps below to test the application on a samsung blockchain-compatible device in send token tab, click create account copy the generated account address go to eth faucet tab to open the free faucet site already added to the application paste the account address and press the send me eth button click the hash string under your transactions to open etherscan and wait until the transaction succeeded go to token faucet tab and press get token to add some tokens in the account confirm the transaction go back to send token tab, click add token and press token balance to see added tokens press gas limit and max priority fee lastly, press send to transfer tokens confirm the transaction check the transaction status and details by finding the account address or the generated transaction hash txn hash in goerli testnet explorer you're done! congratulations! you have successfully achieved the goal of this code lab now, you can develop a decentralized application that can transfer erc20 tokens using samsung blockchain platform sdk if you face any trouble, you may download this file token transaction complete code 2 73 mb to learn more about developing apps with samsung blockchain, visit developer samsung com/blockchain
Develop Samsung Blockchain
docgetting started the following steps should be followed before integrating the samsung blockchain platform sdk: prepare samsung galaxy device to run your apk. check your development environment. android minimum api level for samsung blockchain platform sdk : 24 noteminimum build level for samsung blockchain platform sdk is 21, but will properly work from level 24. configure your ide to integrate samsung blockchain platform sdk with your android app. create an “aar” directory if you don’t have one, and add the blockchainplatformsdk_1.2.03.aar to ”aar” directory in your android project. go to gradle scripts > build.gradle and enter the following dependencies: dependencies { repositories { flatdir{ dirs 'aar' } } implementation name: 'blockchainplatformsdk_1.2.03', ext: 'aar' // network implementation 'com.squareup.retrofit2:retrofit:2.6.0' implementation 'com.squareup.retrofit2:converter-gson:2.6.0' implementation 'com.squareup.okhttp3:logging-interceptor:3.8.0' implementation 'com.google.code.gson:gson:2.8.5' // web3j implementation 'org.web3j:core:4.8.8-android' // for check developer mode implementation 'org.ini4j:ini4j:0.5.4' // dagger implementation 'com.google.dagger:dagger:2.21' annotationprocessor 'com.google.dagger:dagger-compiler:2.21' implementation "io.reactivex.rxjava2:rxjava:2.2.8" implementation "io.reactivex.rxjava2:rxandroid:2.1.1" // protobuf implementation 'com.google.protobuf:protobuf-java:3.9.1' implementation 'com.google.protobuf:protobuf-gradle-plugin:0.8.10' } import the package into your code. import com.samsung.android.sdk.blockchain.*; samsung blockchain platform sdk supports 2 kinds of hardware wallet: samsung blockchain keystore ledger's devices like nano x, nano s. notetransactions on evm-compatible networks binance smart chain, klaytn, polygon, avalanche (c-chain) and fantom are signed from the hardware wallets using the same pathway as that of ethereum. for these transactions, currency unit displayed on hardwarewallet, such as samsung keystore or ledger, will show eth as currency unit instead of bnb, klay, matic, avax and ftm. development setting guide for each environment is as follows: integration with samsung blockchain keystore samsung blockchain keystore is compatible with selected samsung devices only. you need to have one of selected samsung devices to run your app with samsung blockchain keystore. please refer to the restrictions. check your development environment. android minimum api level for samsung blockchain keystore : 28 notesamsung blockchain platform sdk requires samsung blockchain keystore that is higher than 1.5.1. download the samsung blockchain keystore sdk. set 'developer mode' to test your app without app id verification. you can find more information about app id (scw_app_id), here. add "blockchainkeystoresdk_v1.6.0.aar" to "aar" directory in your android project. go to gradle script > build.gradle and add below dependency: dependencies { ... // keystore sdk implementation name: 'blockchainkeystoresdk_v1.6.0', ext: 'aar' ... } integration with nano x or nano s by ledger there is no restrictions to link with ledger device. so any samsung galaxy mobile is ok to test your app which is integrated with samsung blockchain platform sdk when you sign with ledger device. check your development environment. ledger nano x : 1.2.4-1 or higher ledger nano s : 1.6 or higher ledger : ethereum app: 1.9.8 or higher you can refer ledger's guide page to get started. go to gradle > build.gradle and add below dependency: dependencies { ... // ledger implementation 'com.ledger.lib:ledger-android-library:1.2.2' }
Develop Samsung Pay
apioverview package class tree index help package com samsung android sdk samsungpay v2 class watchmanager java lang object samsungpaybase com samsung android sdk samsungpay v2 watchmanager all implemented interfaces apptoappconstants public final class watchmanager extends samsungpaybase implements apptoappconstants this class provides apis for watch management partner apps must check the samsung pay watch status on the device before performing any card management also, this class provides apis getting cards information, adding new card to samsung pay on watch, and so on since api level 2 5 field summary fields modifier and type field description static final string device_serial_num key to represent device serial number to generate the paymentappinstanceid static final int error_invalid_parameter this error indicates that the given parameter is invalid this is returned as spaysdk extra_error_reason for spaysdk error_registration_fail error static final int error_spay_pin_lock_setup_canceled this error indicates that user canceled the pin lock setup partner app should ask user to setup pin for samsung pay gear static final int error_spay_watch_connection this error indicates that samsung pay watch plug-in can not connect with samsung pay watch partner app should ask user to check bluetooth connection or pairing static final int error_spay_watch_pay_progress this error indicates that samsung pay watch is in a process of payment static final int error_spay_watch_pin_lock_setup_canceled this error indicates that user canceled the pin lock setup partner app should ask user to setup pin for samsung pay watch static final int spay_watch_taking_log_for_report this error indicates that samsung pay watch is taking log for error report static final int spay_watch_update_is_ongoing this error indicates that samsung pay watch being updated fields inherited from interface com samsung android sdk samsungpay v2 apptoappconstants error_auth_code_expired , error_auth_code_invalid, error_auth_code_max_try_reached, error_auth_code_type_invalid, error_authentication_closed, error_authentication_failed, error_authentication_not_ready, error_authentication_timed_out, error_card_already_registered, error_card_idv_not_supported, error_card_not_supported, error_framework_internal, error_invalid_card, error_invalid_cardinput, error_max_card_num_reached, error_max_pan_provision_num_reached, error_server_reject, error_tsm_fail, error_verify_card, error_wallet_id_mismatch, extra_app2app_intent, extra_app2app_payload, extra_card_balance, extra_card_status_reason, extra_issuer_app_card_linked constructor summary constructors constructor description watchmanager android content context context, partnerinfo partnerinfo api to get the watchmanager instance the caller should set valid serviceid method summary all methodsinstance methodsconcrete methods modifier and type method description void activatesamsungpay api to bring the samsung pay on watch app to a state in which cards can be added samsung pay on watch might be samsung account is not signed in state partner app checks the samsung pay on watch status with getsamsungpaystatus statuslistener api if the status is #spay_not_ready and #extra_error_reason is #error_spay_setup_not_completed, partner app can call this api to launch samsung pay on watch and user can sign in to the app void addcard addcardinfo addcardinfo, addcardlistener listener api to add a card from partner app example issuer/bank app to samsung pay on watch partner app uses this api to add card to samsung pay on watch by providing the required card details void getallcards android os bundle cardfilter, getcardlistener listener api to get all the cards from samsung pay on watch for the given filter void getsamsungpaystatus statuslistener listener api to get the samsung pay on watch status on the device partner issuers applications must call this api to check the current state of samsung pay on watch before doing any operation void getwalletinfo list<string> keys, statuslistener listener api to get the requested wallet information from samsung pay on watch partner app can use this information to uniquely identify the user and samsung pay on watch app on a particular device void gotoupdatepage api to go to samsung pay on watch update page partner app checks the samsung pay on watch status with getsamsungpaystatus statuslistener api if the status is #spay_not_ready and #extra_error_reason is #error_spay_app_need_to_update, partner app can call this api to go to update samsung pay on watch app methods inherited from class java lang object equals, getclass, hashcode, notify, notifyall, tostring, wait, wait, wait field details device_serial_num public static final string device_serial_num key to represent device serial number to generate the paymentappinstanceid since api level 2 5 see also constant field values error_spay_pin_lock_setup_canceled public static final int error_spay_pin_lock_setup_canceled this error indicates that user canceled the pin lock setup partner app should ask user to setup pin for samsung pay gear since api level 2 5 see also constant field values error_invalid_parameter public static final int error_invalid_parameter this error indicates that the given parameter is invalid this is returned as spaysdk extra_error_reason for spaysdk error_registration_fail error since api level 2 5 see also constant field values error_spay_watch_pin_lock_setup_canceled public static final int error_spay_watch_pin_lock_setup_canceled this error indicates that user canceled the pin lock setup partner app should ask user to setup pin for samsung pay watch since api level 2 5 see also constant field values spay_watch_update_is_ongoing public static final int spay_watch_update_is_ongoing this error indicates that samsung pay watch being updated since api level 2 5 see also constant field values spay_watch_taking_log_for_report public static final int spay_watch_taking_log_for_report this error indicates that samsung pay watch is taking log for error report since api level 2 5 see also constant field values error_spay_watch_pay_progress public static final int error_spay_watch_pay_progress this error indicates that samsung pay watch is in a process of payment since api level 2 5 see also constant field values error_spay_watch_connection public static final int error_spay_watch_connection this error indicates that samsung pay watch plug-in can not connect with samsung pay watch partner app should ask user to check bluetooth connection or pairing since api level 2 5 see also constant field values constructor details watchmanager public watchmanager android content context context, partnerinfo partnerinfo api to get the watchmanager instance the caller should set valid serviceid partnerinfo is passed to samsung pay on watch for caller verification context ct = activity; // or context ct = service; string issuername = "mybank"; // set the serviceid which is assigned by the samsung pay developer during on boarding string serviceid = "sampleserviceid"; bundle bundle = new bundle ; bundle putstring watchmanager extra_issuer_name, issuername ; bundle putstring watchmanager partner_service_type, watchmanager servicetype app2app tostring ; partnerinfo pinfo = new partnerinfo serviceid, bundle ; watchmanager watchmanager = new watchmanager ct, pinfo ; parameters context - activity context or service context partnerinfo - partner information throws nullpointerexception - thrown if parameters are null since api level 2 5 method details getsamsungpaystatus public void getsamsungpaystatus statuslistener listener api to get the samsung pay on watch status on the device partner issuers applications must call this api to check the current state of samsung pay on watch before doing any operation // set the serviceid which is assigned by the samsung pay developer during on boarding string serviceid = "sampleserviceid"; bundle bundle = new bundle ; bundle putstring watchmanager partner_service_type, watchmanager servicetype app2app tostring ; partnerinfo pinfo = new partnerinfo serviceid, bundle ; watchmanager watchmanager = new watchmanager context, pinfo ; watchmanager getsamsungpaystatus new statuslistener { @override public void onsuccess int status, bundle data { // success case if status == spay_ready { log d tag, "samsung pay on watch is ready on the device" ; // perform your operation } else if status == spay_not_ready { // samsung pay on watch is supported but not fully ready // if extra_error_reason is error_spay_app_need_to_update, // call gotoupdatepage // if extra_error_reason is error_spay_setup_not_completed, // call activatesamsungpay } else { // samsung pay on watch is not supported on this device log d tag, "device does not support samsung pay on watch" ; } } @override public void onfail int errorcode, bundle errordata { log e tag, "onfail callback is called, errorcode " + errorcode ; // to get more reason of the failure, // check some extra error codes in the errordata bundle such as watchmanager extra_error_reason if provided } } ; parameters listener - callback through which the result is provided on success, samsung pay on watch status code is provided via statuslistener onsuccess int status, bundle data if samsung pay on watch is ready to be used, #spay_ready will be returned otherwise, #spay_not_ready or #spay_not_supported can be returned with #extra_error_reason from bundle also, partner can get extra information from bundle data bundle keys if provided bundle values spaysdk extra_country_code device country code iso 3166-1 alpha-2 on any failure, the failure code is provided via statuslistener onfail int errorcode, bundle errordata note please refer spaysdk common_status_table in detail throws nullpointerexception - thrown if the callback passed is null since api level 2 5 gotoupdatepage public void gotoupdatepage api to go to samsung pay on watch update page partner app checks the samsung pay on watch status with getsamsungpaystatus statuslistener api if the status is #spay_not_ready and #extra_error_reason is #error_spay_app_need_to_update, partner app can call this api to go to update samsung pay on watch app // set the serviceid which is assigned by the samsung pay developer during on boarding string serviceid = "sampleserviceid"; bundle bundle = new bundle ; bundle putstring watchmanager partner_service_type, watchmanager servicetype app2app tostring ; partnerinfo pinfo = new partnerinfo serviceid, bundle ; watchmanager watchmanager = new watchmanager context, pinfo ; watchmanager gotoupdatepage ; since api level 2 5 activatesamsungpay public void activatesamsungpay api to bring the samsung pay on watch app to a state in which cards can be added samsung pay on watch might be samsung account is not signed in state partner app checks the samsung pay on watch status with getsamsungpaystatus statuslistener api if the status is #spay_not_ready and #extra_error_reason is #error_spay_setup_not_completed, partner app can call this api to launch samsung pay on watch and user can sign in to the app // set the serviceid which is assigned by the samsung pay developer during on boarding string serviceid = "sampleserviceid"; bundle bundle = new bundle ; bundle putstring watchmanager partner_service_type, watchmanager servicetype app2app tostring ; partnerinfo pinfo = new partnerinfo serviceid, bundle ; watchmanager watchmanager = new watchmanager context, pinfo ; watchmanager activatesamsungpay ; since api level 2 5 getwalletinfo public void getwalletinfo list<string> keys, statuslistener listener api to get the requested wallet information from samsung pay on watch partner app can use this information to uniquely identify the user and samsung pay on watch app on a particular device // set the serviceid which is assigned by the samsung pay developer during on boarding string serviceid = "sampleserviceid"; bundle bundle = new bundle ; bundle putstring watchmanager extra_issuer_name, "issuer name" ; bundle putstring watchmanager partner_service_type, watchmanager servicetype app2app tostring ; partnerinfo pinfo = new partnerinfo serviceid, bundle ; watchmanager watchmanager = new watchmanager context, pinfo ; // bundle keys added to get wallet information from samsung pay on watch // this information can be delivered to the partner server for eligibility check arraylist<string> keys = new arraylist<> ; keys add watchmanager wallet_user_id ; keys add watchmanager device_id ; watchmanager getwalletinfo keys, new statuslistener { @override public void onsuccess int status, bundle walletdata { // log d tag, "dowalletinfo onsuccess callback is called" ; // for visa, deviceid can be set to "clientdeviceid" as defined by visa string deviceid = walletdata get watchmanager device_id ; // for visa, walletuserid can be set to "clientwalletaccountid" as defined by visa string walletuserid = walletdata get watchmanager wallet_user_id ; } @override public void onfail int errorcode, bundle errordata { log e tag, "onfail callback is called, errorcode " + errorcode ; // to get more reason of the failure, // check some extra error codes in the errordata bundle such as watchmanager extra_error_reason if provided } } parameters keys - key list to get wallet information if the list is empty, all possible key values are returned the possible keys are #wallet_dm_id #device_id #wallet_user_id device_serial_num listener - callback through which the result is provided on success, statuslistener onsuccess int status, bundle data is invoked with wallet information the success code can be one of the following codes with bundle data status bundle keys bundle values usage vts mdes #error_none #wallet_dm_id string device management id n/a paymentappinstanceid = device_serial_num + wallet_dm_id *if you need 'paymentappinstanceid', you can generate it as above #device_id string device id clientdeviceid #wallet_user_id string wallet user id clientwalletaccountid device_serial_num string device serial number n/a on any failure, the error code is provided via statuslistener onfail int errorcode, bundle errordata note please refer spaysdk common_status_table in detail throws nullpointerexception - thrown if parameters are null since api level 2 5 addcard public void addcard addcardinfo addcardinfo, addcardlistener listener api to add a card from partner app example issuer/bank app to samsung pay on watch partner app uses this api to add card to samsung pay on watch by providing the required card details this helps user to add their cards to samsung pay on watch directly from partner app watchmanager watchmanager = new watchmanager ct, pinfo ; string cardtype = card card_type_credit; string tokenizationprovider = addcardinfo provider_abcd; // get it from issuer app // samsung pay on watch does not provide detailed payload information // generate provisioning payload in accordance with your card network specifications string testpayload = "thisistestpayloadcardinfo1234567890"; bundle carddetail = new bundle ; carddetail putstring addcardinfo extra_provision_payload, testpayload ; addcardinfo addcardinfo = new addcardinfo cardtype, tokenizationprovider, carddetail ; watchmanager 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 ; // to get more reason of the failure, // check some extra error codes in the errordata bundle // such as watchmanager extra_error_reason or watchmanager extra_request_id if provided } @override public void onprogress int currentcount, int totalcount, bundle bundledata { log d tag,"onprogress callback is called " + currentcount + " / " + totalcount ; } } ; parameters addcardinfo - detail card information to add listener - callback through which the result is provided on success, addcardlistener onsuccess int, card is invoked with #error_none status code with added card information on any failure, the error code is provided via addcardlistener onfail int errorcode, bundle errordata the failure code can be one of the following codes with bundle data status bundle keys bundle values #error_registration_fail -104 #extra_error_reason apptoappconstants error_card_already_registered -500 apptoappconstants error_framework_internal -501 apptoappconstants error_invalid_card -502 apptoappconstants error_invalid_cardinput -503 error_invalid_parameter -504 apptoappconstants error_server_reject -505 apptoappconstants error_max_card_num_reached -506 apptoappconstants error_card_not_supported -514 apptoappconstants error_max_pan_provision_num_reached -515 apptoappconstants error_wallet_id_mismatch -516 error_spay_watch_pin_lock_setup_canceled -701 spay_watch_update_is_ongoing -702 spay_watch_taking_log_for_report -703 error_spay_watch_pay_progress -704 error_spay_watch_connection -705 #extra_request_id string value returned from server note please refer spaysdk common_status_table for other error status throws nullpointerexception - thrown if parameters are null since api level 2 17 getallcards public void getallcards android os bundle cardfilter, getcardlistener listener api to get all the cards from samsung pay on watch for the given filter since api level 2 5, partner must define issuer names as a card filter on samsung pay developers while on-boarding bundle cardfilter = new bundle ; watchmanager getallcards cardfilter, new getcardlistener { @override public void onsuccess list<card> cards { // getting card status is success if cards == null || cards isempty { log e tag,"no card is found" ; return; } else { // perform operation with card data for card s cards { log d tag, "cardid " + s getcardid + "cardstatus" + s getcardstatus ; // get extra card data if s getcardinfo != null { string last4fpan = s getcardinfo getstring watchmanager extra_last4_fpan ; string last4dpan = s getcardinfo getstring watchmanager extra_last4_dpan ; string cardtype = s getcardinfo getstring watchmanager extra_card_type ; string cardissuername = s getcardinfo getstring watchmanager extra_issuer_name ; log d tag, "last4fpan " + last4fpan + "last4dpan" + last4dpan + "app2apppayload " + app2apppayload ; } } } } @override public void onfail int errorcode, bundle errordata { log e tag, "onfail callback is called, errorcode " + errorcode ; // to get more reason of the failure, // check some extra error codes in the errordata bundle such as watchmanager extra_error_reason if provided } } ; parameters listener - callback through which the result is provided on success, getcardlistener onsuccess list is invoked with list of cards on any failure, the error code is provided via getcardlistener onfail int, bundle note please refer spaysdk common_status_table in detail throws nullpointerexception - thrown if listener is null since api level 2 13 samsung electronics samsung pay sdk 2 21 00 - sep 06 2024
tutorials blockchain
blogdistributed ledger-based technologies are becoming more popular and easy to use. anyone can now build a new cryptocurrency or token in the blockchain world. this rise in popularity and value makes crypto assets a big target for hackers. if you want to keep your valuable crypto assets safe, using a hardware cold wallet such as trezor or ledger nano s has become a necessity. unfortunately, that adds up to one more item in your pocket that you always have to carry around. thankfully, gone are the days of carrying clunky, old wallets. recent galaxy phones, such as the s10e, s10, s10+, note10, and fold, can now securely store your cryptocurrency wallet using the samsung blockchain keystore (sbk). along with storing your cryptocurrency wallet, the sbk sdk allows you to get your blockchain address and sign cryptocurrency transactions. in this article, we explore one of the key features offered by the keystore sdk--how to get your blockchain address from the sbk sdk and three ways to share it: display as qr code copy to clipboard share through android’s share intent setting up the project and handling sbk data to set up your android project with the sbk sdk, follow these instructions. to use functionalities offered by the sdk, first fetch an instance of the service. private scwservice mscwservice = scwservice.getinstance(); after you have fetched the scwservice instance, you can check whether your device is keystore-supported. if (mscwservice == null) { log.e("keystoreapp", "keystore is not supported on this device."); } if the device is keystore-supported, you can fetch the address list with getaddresslist(): mscwservice.getaddresslist(addresslistcallback, hdpathlist); the first parameter to getaddresslist() is a scwgetaddresslistcallback, which is executed after getting a response from keystore. scwgetaddresslistcallback() has two functions: onsuccess(): this function is called when the address list has been fetched successfully from keystore. onfailure(): this function is called if any errors occur while fetching the address list from keystore. scwservice.scwgetaddresslistcallback addresslistcallback = new scwservice.scwgetaddresslistcallback() { @override public void onsuccess(list addresslist) { //you can share your address from the address list here } @override public void onfailure(int failurecode) { //based on the failure code you can show appropriate alerts here } }; the second parameter is an arraylist of hierarchical deterministic (hd) path(s) whose addresses you want to fetch. if you want to learn more about hd paths, please refer to bip-44. for example, if you want to find the public address of your first five accounts, pass the following list as a parameter: arraylist hdpathlist = new arraylist<>(); hdpathlist.add("m/44'/60'/0'/0/0"); hdpathlist.add("m/44'/60'/0'/0/1"); hdpathlist.add("m/44'/60'/0'/0/2"); hdpathlist.add("m/44'/60'/0'/0/3"); hdpathlist.add("m/44'/60'/0'/0/4"); a sample app with the sbk sdk now that we are familiar with getaddresslist(), let’s dive into our sample application. features of our public address with sbk app are: fetch your public address from the keystore switch between multiple public addresses display qr code of the selected account copy selected address into the clipboard send the selected address with supported applications with android’s share intent initially, only the address of the first account is loaded. when you press the add button, the hd path of a new account is added to hdpathlist, and public addresses are fetched. public void addaccount(view view) { //account index is incremented by 1 to get the new account accountindex++; //hdpath of new account is added to hdpathlist hdpathlist.add("m/44'/60'/0'/0/" + accountindex); showtoast("hdpath added to list"); //public address of new account is fetched getpublicaddress(); } public addresses are fetched using the getpublicaddress() function depicted below. if the address list is fetched successfully, onsuccess() is called, and: the spinner’s previous data is cleared. the newly fetched list is added to the spinner. the ui is updated. if an error occurs, it is logged and available from logcat. common errors such as error_invalid_scw_app_id can be fixed very easily by enabling developer mode from the keystore application. you can find instructions on how to enable developer mode here. private void getpublicaddress() { scwservice.scwgetaddresslistcallback addresslistcallback = new scwservice.scwgetaddresslistcallback() { @override public void onsuccess(final list publicaddresslist) { //after address list has been fetched spinner is updated with new list runonuithread(new runnable() { @override public void run() { //clear existing list spinneradapter.clear(); //new list is added spinneradapter.addall(publicaddresslist); spinneradapter.notifydatasetchanged(); if (publicaddresslist.size() == 1) { showtoast(publicaddresslist.size() + " address fetched."); } else { showtoast(publicaddresslist.size() + " addresses fetched."); } } }); } @override public void onfailure(int errorcode) { switch (errorcode) { case scwerrorcode.error_invalid_scw_app_id: log.e(log_tag,"developer option not enabled."); break; case scwerrorcode.error_check_app_version_failed: log.e(log_tag,"check internet connection."); break; case scwerrorcode.error_op_fail: log.e(log_tag,"operation failed"); break; default: log.e(log_tag,"error with error code: "+errorcode); break; } } }; if (mscwservice == null) { log.e(log_tag, "keystore is not supported in this device."); } else { //if keystore is supported on device address list is requested mscwservice.getaddresslist(addresslistcallback, hdpathlist); } } after loading all addresses into the spinner, we can now select any address from it. once an address is selected, its qr code is generated and displayed. publicaddressspinner.setonitemselectedlistener(new adapterview.onitemselectedlistener() { @override public void onitemselected(adapterview<?> adapterview, view view, int position, long l) { //get selected address from spinner selectedaddress = adapterview.getitematposition(position).tostring(); selectedaddresstextview.settext(selectedaddress); qrcodeimageview.setimagebitmap(generateqrcode(selectedaddress)); } } in this application, we used “zxing” to generate the qr bitmap of the selected public address. private bitmap generateqrcode(string text) { multiformatwriter multiformatwriter = new multiformatwriter(); bitmap bitmap = bitmap.createbitmap(10, 10, bitmap.config.rgb_565); try { //text encoded to qr bitmatrix bitmatrix bitmatrix = multiformatwriter.encode(text, barcodeformat.qr_code, 1000, 1000); barcodeencoder barcodeencoder = new barcodeencoder(); //qr bitmatrix encoded to bitmap bitmap = barcodeencoder.createbitmap(bitmatrix); } catch (writerexception e) { e.printstacktrace(); } finally { return bitmap; } } when you press the copy button, the address is copied to the clipboard. public void copyaddress(view view) { clipboardmanager clipboardmanager = (clipboardmanager) getsystemservice(context.clipboard_service); clipdata clipdata = clipdata.newplaintext("public address", selectedaddress); clipboardmanager.setprimaryclip(clipdata); toast.maketext(this, "address copied", toast.length_short).show(); } we can also share the selected public address using the android action_send intent. public void shareaddress(view view) { intent sendintent = new intent(); sendintent.setaction(intent.action_send); sendintent.putextra(intent.extra_text, selectedaddress); sendintent.settype("text/plain"); startactivity(sendintent); } conclusion now that you know more about the samsung blockchain keystore sdk, you can use it to enrich your blockchain application. additional resources: download the sbk example app more information on keystore sdk
Shuvo Saha
Develop Samsung Blockchain
dockey management in this section, we will cover general terms – public key, private key, and an address, and how samsung blockchain keystore generates and manages these keys. samsung blockchain keystore is a hierarchical deterministic (hd) wallet and follow the industry standards of bip-32, bip-39 and bip-44. (bip stands for bitcoin improvement proposal). by implementing these standards, samsung blockchain keystore aim to provide better user experience to back up the wallet, since the user only needs to keep the root seed of the private and public keys safe. it is just the 12 words generated from samsung blockchain keystore that user needs to remember or write down. we will look into how this is achieved by implementing hierarchical deterministic wallet in samsung blockchain keystore. public key, private key, and address the key pair is mandatory to participate in the blockchain network. this key pair is composed of a public key and a private key. public key is used to derive an address that is used like a user’s account in blockchain. it is safe to share the public key or the address with others. on the other hand, a private key is used to sign transactions and must be kept secret. anyone who has access to the private key can sign transactions and spend cryptocurrency or use crypto-assets without user’s permission. simply put, the private key is a random number. based on the private key, there are algorithms, like elliptic curve digital signature algorithm (ecdsa) that derives the public key. this algorithm may differ depending on the blockchain platform. but one interesting characteristic of a public key is that it is derived from a private key, but the other way around is not possible – public key cannot derive nor predict the private key. the same relationship applies to the public key and the address. address, which is used like a user’s account, cannot derive any public keys. since a private key is a random number, this implies that the randomness of a private key generation must be guaranteed. yet, software random number generators, also known as pseudo random number generators, are known to have security vulnerabilities. because the public key and address format differs by blockchain platforms, user needs to have one key pair for ethereum, another key pair for bitcoin, and etc. if a user wants several accounts for ethereum, then that many number of key pairs will be required. moreover, bitcoin uses countless number of accounts, because after a transaction has been made, any bitcoin changes after the transaction is returned to a different account of the user’s. in other words, it becomes very complex and inconvenient if a user would have to save a key pair for every blockchain account that the user holds. samsung blockchain keystore aims to reduce this by implementing hierarchical deterministic wallet. hierarchical deterministic wallet (hd wallet) hierarchical deterministic wallet allows these multiple key pairs to be derived from a single root seed called, “root seed.” root seed is the root of a large tree of public and private keys. this root seed is the only thing that user needs to store and back up. this is the key to access all of your crypto secrets, so how it is generated and stored should be kept in a secure environment. root seed is between 128 and 256 bits and because the physical look of root seed is not very user friendly, and is a combination of “0” and “1”, there is an industry standard, to replace them with mnemonic words, or a group of words. for example, if the root seed is 128 bits, then with the checksum of 4 bits, a total of 132 bits is split into a group of 11 bits. each group falls into a group number between 0 and 2047, which is an index to a wordlist of 2048 words. these index numbers are then converted into the corresponding words and the combination of 12 words make up “recovery phrase” in samsung blockchain keystore. generating root seed and mnemonic words in samsung blockchain keystore samsung blockchain keystore generates the root seed by trusted app in trusted execution environment, by the steps below: ① true random number generator (trng), also known as hardware random number generator, that is embedded into samsung device chipsets, generates an initial entropy length (ent) of 128 random bits. elaborating more on ent, industry standard allows 128 to 256 bits, in multiple of 32 bits. depending on the length of the initial entropy length, the number of words that this will be converted into will differ, from 12 to 24, in multiple of 3. ② samsung blockchain keystore takes the first 4 bits of the sha-256 hash of the 128 bits to generate something called, “checksum.” theoretically, it is ent/32 that is taken to generate the checksum. so for samsung blockchain keystore, ent is 128 bits, resulting in 4 bits of checksum. for other wallets that generate 24 words with the ent of 256 bits, 8 bits are used as a checksum. ③ samsung blockchain keystore appends the previously generated 4 bits of checksum to the initial entropy length, resulting in 132 bits. ④ 132 bits (combination of initial entropy length and checksum) are divided into 11 bits, resulting in 12 words, “mnemonic codes”. these 12 words are industry standard, and is one of the 2048 words on the bip-39 english wordlist. ⑤ because the 12 words follow bip-39 standard used in the industry, user can back up wallet on a different samsung device that supports samsung blockchain keystore, or other wallets that are bip-39-compatible. importing a wallet when a user imports a wallet in samsung blockchain keystore, the user will enter the 12, 18 or 24 words into the trusted user interface (tui) that will protect user’s input. this time, samsung blockchain keystore will convert the mnemonic words entered in order to the original root seed. the root seed is the one and only source that samsung blockchain keystore will save in a secure area. likewise, this will become the source to generate countless number of public keys and sign transactions with the private keys when a request is made. randomly entering mnemonic words to guess recovery phrase some may raise a question on the feasibility of guessing the words among 2048 words on the mnemonic words list and somehow, getting access to the private key that corresponds to the recovery phrase. but it’s not just the words of 12 to 24 in multiple of 3, that have to correctly chosen, but the order of these words have to be correct as well. this is because if you are using 12 words, then 128 bits must be correctly guessed, and 266 bits for 24 words. choice between 0 and 1 on 128 bits give us 2 x 2 x 2 x … 2 = 2128 of the possible root seeds, and 2^256 cases for 24 words. moreover, the checksum of 4 bits for 12 words, and 8 bits for 24 words, protects randomly making a combination of words. when importing a wallet in samsung blockchain keystore, there is a checksum check after user has entered 12, 18 or 24 words, and it will throw an error that the combination of words entered isn’t a valid recovery phrase. the user will receive absolutely no information on which words make the checksum invalid, making it even more difficult to randomly guess the recovery phrase. hd path the hd wallet is a tree of theoretically infinite number of private and public keys. one interesting fact is that it allows derivation of a child keys from the root seed via a function defined in bip-32 standard, “child key derivation (ckd) functions.” this means with the root seed and the location of the tree, key derivation is feasible. more details on the key derivations can be found in the appendix. the location in the tree is called a “path” and bip-44 standard defines the standard to unify rules for wallet’s compatibility of these hd key generation. hence developers just need to specify the path to derive the address from, and whoever keeps the root seed will be able to calculate and return the actual key value for that specified location. each depth is represented by “/” in the hd path and the apostrophe (‘) implies that the depth is hardened. the following is hd path level standard defined in bip-44. ![](/sd2_images/services/blockchain/hd_path _level_standard.png) purpose’ is “44” here, with the implication that it is the following bip-44 standard. coin_type’ tells if it is ethereum, bitcoin, or other coins. the algorithms to derive the public key from the private key can differ by the coin type, though both ethereum and bitcoin use ecdsa algorithm. the number is constant and set for each crypto, and it can be registered in slip-0044 (slip: satoshilabs improvement proposals), managed by satoshilabs. for example, it is “0” for bitcoin, and “60” for ethereum. account‘ represents multiple accounts number and is usually ‘0’. change is usually used in bitcoin, using “1” for the account to receive all the changes after sending bitcoins to other accounts. normally, “0” is used. address_index is the last depth, and usually starts with 0, and increases by one, when you “add” an account in a wallet. for example, hd path for the first account of ethereum is: m/44’/60’/0’/0/0 and for the second account of bitcoin is: m/44’/0’ /0’/0/1 use of hd path in samsung blockchain keystore samsung blockchain keystore can be used to (1) derive an address or extended public key and (2) sign a transaction. to consume these two features, developers of dapps or wallets will need to define, where in the hd tree, they would like to derive the public key from, and use the corresponding private key to sign the transaction. hd path is a required parameter for apis related to the two features below. get address from samsung blockchain keystore if you are a dapp or wallet developer, you can use samsung blockchain keystore to first get the user’s address or extended public key (public key and the chain code), and search on the blockchain ledger, transaction history and records of the user, so that user can know how much cryptocurrency or crypto-asset is remaining. here’s a brief flow of getting the address. ① wallet or dapps will make a request to samsung blockchain keystore to derive an address or extended public key for hd path “m/44’/60’/ 0’/0/0” (ethereum account). ② using samsung blockchain keystore sdk, wallet/dapp’s request will be passed to samsung blockchain keystore. ③ once samsung blockchain keystore will receives the request to get the address or extended public key, it will pass onto the controller to communicate with trusted app to derive the public key. ④ root seed is stored safely in a secure area, and the derivation of the extended public key (public key and the chain code) of the hd path, is executed by trusted application in trusted execution environment. ⑤ derived public key will be then passed to samsung blockchain keystore app to derive the address, where one more algorithm function will be executed. ⑥ after the calculation, the address that corresponds to the requested hd path will be returned to wallet or dapp via samsung blockchain keystore sdk. sign a transaction by samsung blockchain keystore the user will now want to make a transaction, such as sending cryptocurrencies, that will require the user to “write” on the ledger. this change needs to be signed by the private key that corresponds to the user’s address, derived from user’s public key. below is a diagram and explanation for each step. ① wallet or dapps will make a request to samsung blockchain keystore to sign a transaction. a correctly formatted transaction without the signature part, and hd path to derive the private key to sign the transaction will be needed. ② using samsung blockchain keystore sdk, wallet/dapp’s request will be passed to samsung blockchain keystore. ③ once samsung blockchain keystore will receives the request to get the public key, it will pass onto the controller to communicate with trusted app. ④ trusted app will first parse the transaction, and show critical information on tui, such as recipient address, amount and fees. after user checks the transaction details, user will confirm it via pin verification or fingerprint authentication. ⑤ after the user’s confirmation, the safely stored root seed will now be used to derive the private key that corresponds to the hd path that was passed with the transaction request. then the trusted application will sign the transaction with the derived private key. likewise, these are all executed in trusted execution environment. ⑥ the signed transaction will be returned to samsung blockchain keystore app. ⑦ samsung blockchain keystore app will return the signed transaction to wallet/dapp via samsung blockchain keystore sdk and wallet/dapps can now submit the signed transaction to the blockchain network. more details on the bip-32, bip-39 and bip-44 can be found in the following links. **bip-32:** hierarchical deterministic wallets [https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) bip-39: mnemonic code for generating deterministic keys https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki#wordlists bip-44: multi-account hierarchy for deterministic wallets https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki slip-44: registered coin types for bip-0044 https://github.com/satoshilabs/slips/blob/master/slip-0044.md
Develop Samsung Pay
docconfigure webview enablements to invoke samsung pay application in webview, you should override the shouldoverrideurlloading method javascript and dom storage are disabled in a webview by default you can enable the both through the websettings attached to your webview websettings allows any website to use javascript and dom storage for more information, visit websettings sample code kotlin import android webkit webview import android webkit webviewclient import android content intent import android content activitynotfoundexception companion object { private const val samsung_pay_url_prefix string = "samsungpay" } private lateinit var webview webview webview settings run { javascriptenabled = true domstorageenabled = true } webview webviewclient = object webviewclient { override fun shouldoverrideurlloading view webview, request webresourcerequest boolean { // get url from webresourcerequest val url = request url tostring // add below if statement to check if url is samsung pay deep link if url startswith samsung_pay_url_prefix { try { val intent = intent parseuri url, intent uri_intent_scheme startactivity intent } catch e activitynotfoundexception { // exception would be occured if the samsung wallet app is not installed // go to install samsung wallet app from market val installintent = intent parseuri "samsungapps //productdetail/com samsung android spay", intent uri_intent_scheme installintent addflags intent flag_activity_new_task startactivity installintent } // return true will cause that the url will not be loaded in webview return true } // the remaining part of the shouldoverrideurlloading method code // return false when you want to load url automatically by webview return false } }
Develop Samsung Pay
docflutter plugin overview samsung pay sdk flutter plugin enables to use the samsung pay sdk the primary aim of the samsung pay sdk is to integrate selected samsung wallet features with flutter based android apps on samsung devices the following major operations are supported in the plugin in-app payment gives customers the option of paying for products and services with samsung wallet push provisioning allows customers add a bank card to samsung wallet from the issuer app by providing the required card details to integrate partner applications with the samsung pay sdk flutter plugin, the following components are included in the download samsung pay sdk flutter plugin contains classes, interfaces, and required libraries of samsung pay which is required to communicate with samsung pay services api reference provides descriptions of the apis included in the samsung pay sdk flutter plugin sample merchant app and sample issuer app showing how samsung pay apis can be coded in a finished flutter plugin project all major operations of the samsung pay sdk flutter plugin are implemented for demonstration purposes samsung pay sdk flutter plugin architecture the following diagram shows a high-level architecture revealing the general interactions between the samsung pay sdk flutter plugin and a partner app viewed at this level, the partner apps leverage the samsung pay sdk flutter plugin to perform the operations shown ― push provisioning and opening favorite cards for issuers; online payments for merchants ― with samsung pay the key components involved are partner app - merchant- or issuer-developed app for making online/offline payments and provisioning payment cards through samsung pay samsung pay sdk flutter plugin - sdk integrated into the partner app for direct communication with samsung pay samsung pay app - pay app that the samsung pay sdk communicates with financial network - comprises the payment gateways, acquirers, card associations, and issuers that participate in transaction processing under agreement with the merchant setting up flutter plugin environment the importance of maintaining a good development environment cannot be overstated for integrating the samsung pay sdk flutter plugin with your partner app, the following prerequisites and recommendations help ensure a successful plugin integration and implementation please check the requirements below for the samsung pay sdk flutter plugin for android and system requirements please check the samsung pay android sdk overview to develop a samsung pay sdk flutter plugin service, merchants and issuers need to create service please check this guide for service creation process service registration download the samsung pay sdk flutter plugin to use the plugin the plugin has the following directory structure folder contents docs api reference documentation libs samsungpaysdkflutter_v1 01 00 flutter plugin – contains the samsung pay apis to be used by your partner app samples sample apps integrate samsung pay sdk flutter plugin with your project be sure to do the following before attempting to use the plugin if not already part of your environment, download and install an ide android studio is recommended download the samsung pay sdk flutter plugin configure your ide to integrate the samsung pay sdk flutter plugin with your partner app go to pubspec yaml and enter the following dependency dependencies samsung_pay_sdk_flutter path plugin_directory_path\ [note] if your plugin path is c \users\username\downloads, the dependency will be like below dependencies samsung_pay_sdk_flutter path c \users\username\downloads\ for android proguard rules and dexguard, please check the android sdk overview
web
let's build together we provide various sdks and tools to extend your apps with our services and apis. popular services and technologies galaxy gamedev galaxy themes galaxy watch health samsung iap samsung internet mobile galaxy sdk get started get set up to use samsung mobile sdks in your apps. galaxy ar emoji sdk create your own avatar in your app galaxy gamedev build games for galaxy devices - the world's largest mobile gaming platform galaxy performance sdk optimize your application performance galaxy s pen remote sdk control apps remotely with your s pen galaxy themes with galaxy themes, you can personalize galaxy devices' screens galaxy z (foldable) app design guide for foldable phones health create a useful health app on galaxy watch and a smartphone samsung automation studio develop your apps using samsung automation studio samsung dex build apps to control desktops with smartphones samsung blockchain build blockchain-enabled services for mobile devices samsung ese sdk provides a way for service providers to deploy services using ese on samsung devices samsung iap sdk make it possible to sell a variety of items in samsung galaxy apps samsung internet build web apps for the samsung internet browser-powering all samsung devices samsung wallet an all-in-one, single-swipe solution for tickets, boarding passes, coupons, and more visual display develop your application and leverage your business with smart tv and smart display devices smart tv learn how to extend your apps to the big screen. create seamless tv experiences with tizen smart hospitality display welcome your guests in with captivating displays and memorable experiences that are managed by hotel staff using tizen smart signage professional-grade image quality and high impact messaging to suit whatever your business needs digital appliance get in-depth information and resources to design high quality apps for samsung’s products and services. family hub create your own avatar in your app platform create smartapps. develop a rich, connected experience to automate a wide variety of iot devices bixby apply voice to your apps smartthings add smartness to your users' lives knox secure your devices tizen build apps that connect everything samsung code lab learn about how to use samsung sdks and tools to implement various use cases with sample apps. go to code lab forum looking for a community? meet other developers. ask questions, find answer. go to forum newsletter monthly newsletter for samsung developers if you don't currently receive the newsletter, you can subscribe here. 뉴스레터 전송을 위한 개인정보 수집∙이용에 동의합니다(필수). detail 광고성 정보 수신에 동의합니다(필수). detail i agree to data processing for sending newsletters. (required) detail i consent to receiving newsletters via email. (required) i consent to receiving newsletters via email. detail subscribe
Develop Samsung Pay
docbecome a member to become a samsung pay partner, firstly you need to sign up to the samsung pay portal and then register your membership sign up/sign in to sign up as a samsung pay partner and request access to the samsung pay developers site, do the following in your browser, go to samsung pay developers if you already have a samsung account, click log in otherwise, click sign up and create an account a company business email address that won't change over time is recommended as the primary samsung account user id for managing your portal projects agree to the site's terms and conditions and acknowledge that you understand the samsung pay partners privacy policy, then click create a samsung account fill out the onscreen account creation form, making sure to correctly type the security code, then click continue click sign up, enter your samsung account id email address and password, then click sign in look in your email inbox for a welcome message with an account activation link and click the link this opens the developers site registration page complete the company and user profile described in the next step to become a registered samsung pay developer partner register your membership while becoming a member of the samsung pay developer community, you need to provide some information about your company - contact information, type of business, size, etc this information is entered into a company and user profile, which you can subsequently update as changes occur if you are the first one in your company to join samsung pay developers, you will be the principal contact as such, you will be given permissions to manage projects and invite others in your company to collaborate if you are an invited co-worker, you'll need your company's partner id to register follow these steps to register if you are the first samsung pay member of your company to register, select the first option "i am the first samsung pay member of my company" if you were given a samsung pay partner id by a co-worker, select the second option "my company is already registered" and enter your company's partner id in the field provided click next complete the company information form and agree to the terms and conditions of use, then click save and next if you cannot complete the profile at this time, click skip and verify later complete the user information form, then click done; or, if you cannot provide the information at this time, click skip and verify later upon review of the information provided, your samsung pay relationship manager rm may request additional details once your membership registration is approved, you'll be granted access to currently restricted areas of the samsung pay portal and you can invite members of your team to collaborate on your samsung pay projects until then, take advantage of valuable resources like the samsung pay sdk and sdk programming guide from the following link android sdk [in-app payment and push provisioning] https //developer samsung com/pay/native/sdk-overview html web checkout sdk https //developer samsung com/pay/web/overview html w3c mobile payment https //developer samsung com/internet/android/web-payments-integration-guide html when you receive the email notifying you of membership approval, you're ready to get started in your browser, return to the samsung pay portal and sign in set up your partner project when you integrate your project with samsung pay, it is important to have a clear understanding of what is involved for starters, consider the difference between apps and services app an app can be your issuer app or merchant app service a service is a combination of your app, its service type, a csr and a service id your app will pass these information to samsung wallet for partnership verification you can create different service for the same package for multiple purpose testing note that,only one application can be added under one service id for example app deployment scenario unique service-app combinations global issuer app using a different csr encryption key for services in different regions to interact with local servers service 1 = com issuer walletapp, csr1_us service 2 = com issuer walletapp, csr2_plcc_abcmart same issuer app for all customers but different csrs for managing different card services b2b vs plcc service 1 = com issuer walletapp, csr1_regular service 2 = com issuer walletapp, csr2_plcc_abcmart multiple merchant apps using the same pg service 1 = com merchant electronicsapp, csr_pg1 service 2 = com merchant groceryapp, csr_pg1 global merchant app using a different pg for each country service 1 = com merchant electronicsapp, csr_pg1 service 2 = com merchant electronicsapp, csr_pg2 multiple web sites using the same pg service 1 = electronicssite merchant com, csr_pg1 service 2 = grocerysite merchant com, crs_pg1 global merchant web site using a different pg for each country service 1 = electronicsapp merchant com, csr_pg1 service 2 = electronicsapp merchant com, csr_pg2 create new service to create a new service follow the below steps go to my projects > service management or click services management in the navigation panel on the left, then click create new service select for test or for release to define the service for integration with samsung pay, then click next note that, samsung pay will verify all services requested only for release purpose this is to ensure all samsung pay features are functioning correctly and follows samsung pay guideline select your desired service type web online payment service w3c mobile web payments in-app online payment service app to app card enrollment click save and next web online payment service enter the new service name select your service country select your payment gateway from the list of supported payment gateways if your payment gateway uses the network token mode, upload the certificate signing request csr you obtained from your pg supported formats are csr or pem contact your pg for details confirm your agreement with the portal's terms and conditions click the link to read and print , then click done thus, you have completed service configuration for web online payment w3c mobile web payments service enter the new service name select your service country select your payment gateway from the list of supported payment gateways if your payment gateway uses the network token mode, upload the certificate signing request csr you obtained from your pg supported formats are csr or pem contact your pg for details enter the payment domain name s for your website in the service domain field and click add for example, if your domain is mywebstore com but the checkout page is hosted on the subdomain payments mywebstore com, you will need to enter payments mywebstore com as the service domain in the portal for each additional domain name, click add confirm your agreement with the portal's terms and conditions click the link to read and print , then click done thus, you have completed service configuration for w3c mobile web payments in-app online payment service enter the new service name select your service country select your payment gateway from the list of supported payment gateways drag and drop the csr you share with your payment gateway in the box provided or click the paperclip to browse confirm your agreement with the portal's terms and conditions click the link to read and print , then click save and next app to app card enrollment service enter the new service name select your service country add issuer names these correspond to your financial institution/bank's name s registered with the card networks be sure to click the add button after each entry note that, the issuer name on the samsung pay portal and the actual issuer name of the card must match if you cannot confirm the actual issuer name of the card, just add your card to samsung wallet app and see its details information open wallet app > tap on the card > three-dot menu > customer services option under the title you will find the issuer name confirm your agreement with the portal's terms and conditions click the link to read and print , then click save and next for android sdk in-app online payment service and push provisioning service , you have to go through two additional steps- providing app information and setting test environment providing app information if you have already registered an app following register a partner app for android sdk section, select i already registered app information then select the desired app name from the app list you can add a new app on the fly by selecting i will upload new app information click next setting test environment now enter up to 30 test accounts comma-separated these are samsung accounts associated with a registered samsung pay app on a supported device you can always edit the service later to add or delete test accounts click done to save the service configuration and see it listed in your service management dashboard register a partner app for android sdk go to my projects > app management in the navigation panel on the left, then click add new app enter the app name enter its package name to specifically identify this app enter an app description optional; helpful for version control upload the apk file by dragging and dropping it in the corresponding box click the paperclip icon to browse upload representative screenshots showing ui branding elements/buttons in a supported format png, jpeg, gif indicating samsung pay as a supported payment option in your app steps 5 and 6 are required for release versions of your app; not required for initial integration testing click create, then click next at the bottom of the plug-in configuration page your newly added app is now listed in your app management dashboard you can view its details by clicking its app name then, on the app details page, you can edit the app name and description by clicking the corresponding pencil icon
We use cookies to improve your experience on our website and to show you relevant advertising. Manage you settings for our cookies below.
These cookies are essential as they enable you to move around the website. This category cannot be disabled.
These cookies collect information about how you use our website. for example which pages you visit most often. All information these cookies collect is used to improve how the website works.
These cookies allow our website to remember choices you make (such as your user name, language or the region your are in) and tailor the website to provide enhanced features and content for you.
These cookies gather information about your browser habits. They remember that you've visited our website and share this information with other organizations such as advertisers.
You have successfully updated your cookie preferences.