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

PayPal Sync API Missing #1129

Open
Nimja opened this issue Jun 27, 2018 · 7 comments
Open

PayPal Sync API Missing #1129

Nimja opened this issue Jun 27, 2018 · 7 comments

Comments

@Nimja
Copy link

Nimja commented Jun 27, 2018

https://developer.paypal.com/docs/integration/direct/sync/#

This is not implemented in your API, why?

@d4mn
Copy link

d4mn commented Mar 13, 2019

Yeah me too looking for it

@lakester
Copy link

lakester commented Apr 6, 2019

Looking for it as well. No joy.

@dattz
Copy link

dattz commented Jul 6, 2019

Any update?

@Nimja
Copy link
Author

Nimja commented Aug 12, 2019

Also, PayPal sync is not in the V2 api, frustrating! As there's no way to get "all transactions, regardless of source"

@observaInc
Copy link

A short term workaround would be to just write your own sync class:

<?php

use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;

class PayPalSync extends PayPalResourceModel
{
  public static function get($transId = "", $apiContext = null, $restCall = null)
  {
    $payLoad = "";
    $startDate = "2019-11-20T00:00:00-0700";
    $endDate = "2019-11-30T23:59:59-0700";
    $url = '/v1/reporting/transactions?page_size=10&page=1&start_date=' . $startDate . '&end_date=' . $endDate . '&fields=all';
    if (is_string($transId) && trim($transId) != "") {
      ArgumentValidator::validate($transId, 'transactionId');
      $url .= "&transaction_id=" . $transId;
    }
    return self::executeCall($url, "GET", $payLoad, null, $apiContext, $restCall);
  }
}

I might have missed something, but I noticed the start date and end date parameters are required. So you need a general idea of when the transaction occurred since they can't be more than 31 days apart. Also, you'd probably want to pass these in to the method.

@Spreeuw
Copy link

Spreeuw commented Dec 3, 2019

See #1262 for a more complete pull request for this feature

@sai5839448
Copy link

😃

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

No branches or pull requests

8 participants