TomorrowIdeas / plaid-sdk-php

PHP bindings for the Plaid API
MIT License
111 stars 42 forks source link

Transaction api generate an error with right clientId, SecretKey and accessToken #36

Closed gigalabs18 closed 3 years ago

gigalabs18 commented 3 years ago
public function getTransactionList (Request $request) {
      $start_date =   Carbon::now();
      $end_date =    Carbon::now()->subWeek();

      $accessToken = $request->get('accessToken');
      try {
        $transaction = $this->plaid->transactions->list($accessToken, $start_date, $end_date, []);
      }
      catch ( PlaidRequestException $exception) {
        dd($exception->getResponse());
      }
      return $this->sendSuccessResponse('balance', $transaction, 'balance get successfully!');
    }
{
    "display_message": null,
    "documentation_url": "https://plaid.com/docs/?ref=error#item-errors",
    "error_code": "PRODUCT_NOT_READY",
    "error_message": "the requested product is not yet ready. please provide a webhook or try the request again later",
    "error_type": "ITEM_ERROR",
    "request_id": "a2t7ZTlOjB3HxOL",
    "suggested_action": null
}

Package version is 1.0 and php version is 7.3

brentscheffler commented 3 years ago

Please read Plaid API docs:

https://plaid.com/docs/errors/item/#product_not_ready