tappay-android-example icon indicating copy to clipboard operation
tappay-android-example copied to clipboard

Failed to get prime on Android devices

Open blaizechuang opened this issue 1 year ago • 1 comments

In the older tutorial guide (3.4.5), we could design the credit card layout on our own without using TPDForm. Sample code likes below m_TPDCard = new TPDCard(mContext, new StringBuffer(credit), new StringBuffer(month), new StringBuffer(year), new StringBuffer(cvv)).onSuccessCallback(new TPDCardTokenSuccessCallback() { @Override public void onSuccess(String s, TPDCardInfo tpdCardInfo, String s1) { Log.d(TAG, "Prime: " + s); prime = s; } }).onFailureCallback((i, s) -> Log.d(TAG, "Failed to get prime, error code: " + i + ", message: " + s)); m_TPDCard.createToken("UNKNOWN");

However, we found that even after upgrading the SDK to version 3.9.1, we still encountered the same error code as the following without making any changes to the code: Failed to get prime, error code: -3, message: Internet Unavailable

I am sure that I can access the internet. Could you please help to check if there are any questions?

blaizechuang avatar Jul 27 '23 02:07 blaizechuang

In the older tutorial guide (3.4.5), we could design the credit card layout on our own without using TPDForm. Sample code likes below m_TPDCard = new TPDCard(mContext, new StringBuffer(credit), new StringBuffer(month), new StringBuffer(year), new StringBuffer(cvv)).onSuccessCallback(new TPDCardTokenSuccessCallback() { @Override public void onSuccess(String s, TPDCardInfo tpdCardInfo, String s1) { Log.d(TAG, "Prime: " + s); prime = s; } }).onFailureCallback((i, s) -> Log.d(TAG, "Failed to get prime, error code: " + i + ", message: " + s)); m_TPDCard.createToken("UNKNOWN");

However, we found that even after upgrading the SDK to version 3.9.1, we still encountered the same error code as the following without making any changes to the code: Failed to get prime, error code: -3, message: Internet Unavailable

I am sure that I can access the internet. Could you please help to check if there are any questions?

I will like to add more information. We implemented the custom credit card input UI for iOS, Web, and Android without using TPDFrom. And calculate the prime by the credit card data.

iOS and Web work without any problems but only Android has this issue.

blaizechuang avatar Jul 29 '23 20:07 blaizechuang