Add a co-badge card
add a co-badge card to add a co-badge card to samsung wallet, use the addcobadgecard method, provided by the cardmanager for the samsung pay sdk for android or samsungpaysdkflutter for the samsung pay sdk for flutter class as a co-badge card combines 2 payment networks, you must provide the card details for 2 different networks to provision the card as you can provide the necessary card details without customer input, this method allows direct provisioning without switching between apps noteif your app is running on a samsung watch, create a watchmanager class instead of cardmanager gather the necessary card and wallet details in separate provisioning payloads for the primary and secondary card network, following the card networks' requirements call the addcobadgecard method the result is delivered to the addcardlistener interface, which provides the following events onsuccess called when the operation is successful and returns information and status for the provisioned co-badge card onfail called when the operation fails the following code snippet is an example of using the addcobadgecard method samsung pay sdk for android string cardtype = card card_type_credit; string primarytokenizationprovider = addcardinfo provider_abcd; // provide your primary card network payload string testprimarypayload = "thisistestprimarypayloadcardinfo1234567890"; string secondarytokenizationprovider = addcardinfo provider_efgh; // provide your secondary card network payload string testsecondarypayload = "thisistestsecondarypayloadcardinfo1234567890"; bundle primarycarddetail = new bundle ; primarycarddetail putstring addcardinfo extra_provision_payload, testprimarypayload ; addcardinfo primaryaddcardinfo = new addcardinfo cardtype, primarytokenizationprovider, primarycarddetail ; bundle secondarycarddetail = new bundle ; secondarycarddetail putstring addcardinfo extra_provision_payload, testsecondarypayload ; addcardinfo secondaryaddcardinfo = new addcardinfo cardtype, secondarytokenizationprovider, secondarycarddetail ; cardmanager addcobadgecard primaryaddcardinfo, secondaryaddcardinfo, new addcardlistener { @override public void onsuccess int status, card card { log d tag, "onsuccess callback is called" ; } @override public void onfail int error, bundle errordata { log d tag, "onfail callback is called" ; // check extra error codes in the errordata bundle, such as // samsungpay extra_error_reason or samsungpay extra_request_id if provided } } samsung pay sdk for flutter string cardtype = walletcard card_type_credit_debit; string primarytokenprovider = addcardinfo provider_abcd; // provide your primary card network payload string testprimarypayload = "thisistestprimarypayloadcardinfo1234567890"; string secondarytokenprovider = addcardinfo provider_efgh; // provide your secondary card network payload string testsecondarypayload = "thisistestsecondarypayloadcardinfo1234567890"; map<string, dynamic> primarycarddetails={}; primarycarddetails[addcardinfo extra_provision_payload] = testprimarypayload; map<string, dynamic> secondarycarddetails={}; secondarycarddetails[addcardinfo extra_provision_payload] = testsecondarypayload; var primaryaddcardinfo = addcardinfo cardtype, primarytokenprovider, primarycarddetails ; var secondaryaddcardinfo = addcardinfo cardtype, secondarytokenprovider, secondarycarddetails ; myapp samsungpaysdkflutterplugin addcobadgecard primaryaddcardinfo, secondaryaddcardinfo, addcardlistener onsuccess status, card { print "success $status / data $card" ; },onfail errorcode, bundle { print "error $errorcode / data $bundle" ; },on-progress currentcount, totalcount, bundle { print "currentcount $currentcount / totalcount $totalcount / data $bundle" ; } ;