Skip to content
This repository was archived by the owner on Jun 11, 2021. It is now read-only.
This repository was archived by the owner on Jun 11, 2021. It is now read-only.

Get transaction id from paypal sdk 2.15.+ when PayPal Confirmation #402

@stoichoandreev

Description

@stoichoandreev

General information

I have problem with sending transaction id to our backend when PaymentActivity return result to my Activity.

  • SDK/Library version: 2.15.3
  • Environment: Sandbox
  • Android Version and Device: Nexus 5 with Android 5.1

Issue description

My issue is when I need to send (make a request) to our backend the transaction id after PaymentActivity return result to my Activity. Like your example app shows I need to do

PaymentConfirmation confirm = data.getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);

and then from this confirm object I need to get the data like json

{ "client": { "environment": "sandbox", "paypal_sdk_version": "2.15.3", "platform": "Android", "product_name": "PayPal-Android-SDK" }, "response": { "create_time": "2017-05-09T10:46:13Z", "id": "PAY-0S1319267Y964945XLEIZ35I", "intent": "sale", "state": "created" }, "response_type": "payment" }

At the end I need to pick up response -> id and send it to our backend.

When I do this on Sandbox environment our backend return error 500 and it tells me that transaction id is not valid ( PAY-0S1319267Y964945XLEIZ35I ). I have tried to find some info about this problem and it seems that , this one paypal/PayPal-iOS-SDK#125 is similar to my problem, but it is iOS issue and it seems to be resolved a long time ago.
Paypal implementation in our backend is working with transaction ids not starting with "PAY" prefix , so that is why I am not sure is "id": "PAY-0S1319267Y964945XLEIZ35I" a transition id or some other id. Can you help me guys what is wrong with the id that I am sending back to our server.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions