paypal / paypal-android

One merchant integration point for all of PayPal's services
Apache License 2.0
66 stars 39 forks source link

Payment By Card PayPal #174

Open aaaaasunil opened 11 months ago

aaaaasunil commented 11 months ago

PayPal Android SDK Version

2.16.0

Environment

Live

Android Version & Device

No response

PayPal dependencies

implementation group: 'com.paypal.android', name: 'card-payments', version: '0.0.9'
implementation group: 'com.paypal.sdk', name: 'paypal-android-sdk', version: '2.16.0'

I Upade it to: implementation group: 'com.paypal.android', name: 'card-payments', version: '0.0.10' But same error occurred..

Error Message : onApproveOrderFailure {"code":500,"correlationID":"33184faca65b5","errorDescription":"An internal server error has occurred. -\u003e [Issue: INTERNAL_SERVICE_ERROR.\nError description: An internal service error has occurred.]","detailMessage":"Error: 500 - Description: An internal server error has occurred. -\u003e [Issue: INTERNAL_SERVICE_ERROR.\nError description: An internal service error has occurred.]","stackTrace":[],"suppressedExceptions":[]}

Describe the bug

I implemented the custom card UI for payment by paypal. It working fine but from last week it is not working in LIVE Environment.

My Code is - CardRequest cardRequest = new CardRequest( payPalOrderID, new com.paypal.android.cardpayments.Card( etCardNumberAddCardPayPal.getText().toString(), addCardExpirationMonth, addCardExpirationYear, etCvvAddCardPayPal.getText().toString(), etNameAddCardPayPal.getText().toString(), null ), returnUrl, SCA.SCA_ALWAYS // default value is SCA_WHEN_REQUIRED );

To reproduce

Implemented the according to this git hub link.

Expected behavior

Pls suggest me where i am worng.

Screenshots

No response

emartynov commented 11 months ago

It looks like a PayPal server error. Let's wait for help from PayPal people.

scannillo commented 11 months ago

implementation group: 'com.paypal.sdk', name: 'paypal-android-sdk', version: '2.16.0'

👋 Hello @emartynov! So this SDK only occupies the com.paypal.android namespace and the latest available version is 0.0.10. The com.paypal.sdk SDK is no longer active and should not be used at all.

Are you still seeing an issue after you remove it?

emartynov commented 11 months ago

@scannillo sorry that I jumped with the comment. From the topic starter message, it looks like he tried to use the kotlin SDK for the card payment. The 0.0.9 and 0.0.10 versions.

@aaaaasunil please confirm. If so you probably do not need the Paypal android SDK at all. As well it might mess up your transitive dependencies. I would try to remove that from the project completely and see if it builds.

sshropshire commented 11 months ago

@aaaaasunil any update on this? As @scannillo mentioned only implementation 'com.paypal.android:card-payments:0.0.9' should be needed.

aaaaasunil commented 11 months ago

implementation group: 'com.paypal.sdk', name: 'paypal-android-sdk', version: '2.16.0'

👋 Hello @emartynov! So this SDK only occupies the com.paypal.android namespace and the latest available version is 0.0.10. The com.paypal.sdk SDK is no longer active and should not be used at all.

Are you still seeing an issue after you remove it?

Ma'am, Thank you for reply. Yes, I am still facing the same issue after remove the implementation group: 'com.paypal.sdk', name: 'paypal-android-sdk', version: '2.16.0' it.

And update this implementation group: 'com.paypal.android', name: 'card-payments', version: '0.0.9' to implementation group: 'com.paypal.android', name: 'card-payments', version: '0.0.10'

This is working fine on SANDBOX environment. But in LIVE environment it is give me "code":500,"correlationId":"801c380714d51","errorDescription":"An internal server error has occurred. -\u003e [Issue: INTERNAL_SERVICE_ERROR.\nError description

It is working fine in both environment . But from last 2 weeks i am facing this issue in live environment. Please help me.

aaaaasunil commented 11 months ago

@scannillo sorry that I jumped with the comment. From the topic starter message, it looks like he tried to use the kotlin SDK for the card payment. The 0.0.9 and 0.0.10 versions.

@aaaaasunil please confirm. If so you probably do not need the Paypal android SDK at all. As well it might mess up your transitive dependencies. I would try to remove that from the project completely and see if it builds.

Thank you for reply, I removed the paypal sdk and update the card payment 0.0.9 to 0.010 but same error occurred.

ShivamDev-augurs commented 1 month ago

@scannillo val billingAddress = Address( countryCode = "IT", streetAddress = "123 Main St", region = "BARI", postalCode = "22601", )

    val card = Card(
        number = "4020023496208604",
        expirationMonth = "04",
        expirationYear = "2029",
        securityCode = "440", 
        cardholderName = "Test User", 
        billingAddress = billingAddress
    )

    val cardRequest = CardRequest(
        orderId = orderId, 
        card = card,
        returnUrl = returnUrl,
        sca = SCA.SCA_ALWAYS
    )
     cardClient.approveOrder(this, cardRequest)

onApproveOrderFailure: Error: 400 - Description: Request is not well-formed, syntactically incorrect, or violates schema. -> [Issue: INVALID_PARAMETER_SYNTAX. Error description: The value of a field does not conform to the expected format., Issue: INVALID_PARAMETER_SYNTAX. Error description: The value of a field does not conform to the expected format.], com.paypal.android.corepayments.PayPalSDKError: Error: 400 - Description: Request is not well-formed, syntactically incorrect, or violates schema. -> [Issue: INVALID_PARAMETER_SYNTAX. Error description: The value of a field does not conform to the expected format., Issue: INVALID_PARAMETER_SYNTAX. Error description: The value of a field does not conform to the expected format

Same data I checked in ios app there it's working in andorid I am getting this issue. Can anyone help me how I can fix this