datatrans / android-sample-app

sample android app which integrates the datatrans library
https://docs.datatrans.ch/docs/integrations-mobile-sdk
0 stars 13 forks source link

Localization error message from SDK #12

Open khanhnt3010 opened 3 years ago

khanhnt3010 commented 3 years ago

I'm using datatrans SDK for android, we have a lof of error codes right now, I have 2 problems with the error code:

ErrorCode Message
1403 3D authentication failed
1403 Declined
1403 3D status U - auth. is not allowed
10000 Shopping Cart amount has changed!
1403 Withdrawal amount exceeded
10000 Exception Ocured! Details logged into PaymentLog
10000 Shopping Cart error on checkout!
1402 Declined - card expired
10000 Required values does not match!
1404 Declined - card blocked
1004 expy
1001 hidden mode - required parameter(s) missing: [cardno]
1402 card expired
1004 ACS.RCPTFailure
97 Transient system failure
1402 Declined - card invalid
1403 Authentication failed
10000 ContractId does not match!
1002 cardno x paymentmethod parameters mixed
97 PAReq.CH.acctID
1201 Create secondary connection error: connect timed out
1201 Communication to Host: While reading byte 1 - bad message length 00 00
1402 1/15
1004 expm
1004 VEReq.pan
1403 test card declined
1001 hidden mode - required parameter(s) missing: [cardno, cvv]
97  
1009 unknown CC type
1004  
97 CH.acctID
1201 Create secondary connection error: Connection refused
1402 1/14
1004 pan
1001 hidden mode - required parameter(s) missing: [expm]
1402 2/15
97 ACS.RCPTFailure
1402 2/14
99 transaction timeout
1402 8/13
1402 5/15
1402 3/15
1402 7/14
1001 hidden mode - required parameter(s) missing: [cvv]
1402 4/14
1402 10/14
97 error
1004 Transient system failure
1402 3/14
1402 8/15
1403 REFERRAL trx
1004 413972xxxxxx7201
97 Not a MasterCard supported card range (acq bin)
97 Message
1004 1615xxxxx
1004 Arcot ACS internal error
1004 XML parsing error
1403 Declined: Payment aborted by the customer.
1402 9/14
1402 7/15
1004 PAReq.CH.acctID
97 ThreeDSecure
1002 expiration date
khanhnt3010 commented 3 years ago

@dmengelt What do you think about this?

dmengelt commented 3 years ago

@khanhnt3010 sorry for the late answer. You are right. Only iOS has this feature. We are currently working an a complete new SDK (iOS and Android) which will align the error message handling between the two platforms. Also, we will release a new version of the current Android SDK in order to improve the situation. I mentioned this already here:

https://github.com/datatrans/android-sample-app/issues/10#issuecomment-795338409

For now, my suggestion is that you only have a specific mapping for the following errors:

INVALID CARD            1400
EXPIRED CARD            1402
CARD BLOCKED            1404
SOFT DECLINED           1407

For all other you have to display a generic error message.