Skip to content

Failed to get prime on Android devices #22

Open

Description

@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?

Activity

  1. blaizechuang commented on Jul 29, 2023

    @blaizechuang
    Author

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions