Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Nothing in "agreement_transaction_list" after checking the transaction had been completed #1352

Open
Raphoon opened this issue Apr 2, 2020 · 9 comments

Comments

@Raphoon
Copy link

Raphoon commented Apr 2, 2020

General information

  • SDK/Library version: 1.14.0
  • Environment: Sandbox and also in Production

Issue description

this is sandbox data

image

I checked that transaction had been completed but when I get the transaction lists by using

Agreement::searchTransactions function I got nothing in array "agreement_transaction_list".

Agreement::searchTransactions( "I-2V5TB3SA2DYT", array( 'start_date' => date('Y-m-d', strtotime('-15 days')), 'end_date' => date('Y-m-d', strtotime('+15 days')) ), $this->ApiContext );

@viktorivanov
Copy link

This happened to me, too. Executing Agreement::searchTransactions method is returning empty agreement_transaction_list array.

@Raphoon
Copy link
Author

Raphoon commented Apr 3, 2020

This happened to me, too. Executing Agreement::searchTransactions method is returning empty agreement_transaction_list array.

I found that this function is related to api

/v1/payments/billing-agreements/{agreement_id}/transactions
https://developer.paypal.com/docs/api/payments.billing-agreements/v1/#billing-agreements_transactions

There is a notice that "/v1/payments/billing-agreements" endpoints are deprecated and they recommend to use "/v1/billing/subscriptions" instead.
But after using that url still got "RESOURCE_NOT_FOUND" error

@viktorivanov
Copy link

They are deprecated, but I'm supporting an app with legacy code which is not ready to be upgraded. And as far as I know, the Subscriptions API is not compatible with Billing Plans and Billing Agreements APIs.

@Raphoon
Copy link
Author

Raphoon commented Apr 3, 2020

Does It mean that getting Transaction Id by using Agreement Id is impossible for now?

@viktorivanov
Copy link

@Raphoon I think they finally fixed it!
This morning I was able to retrieve agreement_transaction_list data. Maybe you could try to see if it works on your side as well.

@Raphoon
Copy link
Author

Raphoon commented Apr 23, 2020

@Raphoon I think they finally fixed it!
This morning I was able to retrieve agreement_transaction_list data. Maybe you could try to see if it works on your side as well.

Are you still able to get right data?

@viktorivanov
Copy link

@Raphoon I think they finally fixed it!
This morning I was able to retrieve agreement_transaction_list data. Maybe you could try to see if it works on your side as well.

Are you still able to get right data?

Yes, it works as expected.

@Raphoon
Copy link
Author

Raphoon commented Apr 24, 2020

Yes, it works as expected.

I think there should be some delay between payment and retrieving. request right after the payment still bring empty array. But after some seconds(almost a minute) it works right.

@viktorivanov
Copy link

Yes, it works as expected.

I think there should be some delay between payment and retrieving. request right after the payment still bring empty array. But after some seconds(almost a minute) it works right.

For me on sandbox mode it has always been like this - around 4-5 minutes delay before the payment becomes available and the billing agreement state transitions from pending to complete. And I think during production transactions are almost immediately available and Billing Agreement doesn't have a pending status.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants