Trying to get the Lines endpoint to work
JensKirk opened this issue · comments
Hi :-)
As a continuation of issue no 29 I want to use the newly added lines endpoint in order to get a listing of the weekly payouts / bank transfers to the webshop owners (merchants).
I use this:
PayLike::Client()->merchants()->lines();
But it only returning this:
Paylike\Endpoint\Merchant\Lines Object ( [paylike:protected] => Paylike\Paylike Object ( [client] => Paylike\HttpClient\CurlClient Object ( [base_url:Paylike\HttpClient\CurlClient:private] => https://api.paylike.io [api_key:Paylike\HttpClient\CurlClient:private] => xxxxxxxxxxxxxxxx [verify_ssl] => 1 ) [api_key:Paylike\Paylike:private] => xxxxxxxxxxxxxxx [version:Paylike\Paylike:private] => 1.0.7 ) )
I have also tried:
PayLike::Client()->merchants()->lines()->find($merchantID, Null);
But it said: "Endpoint not found"
Can you help?
Hi @JensKirk, this is an example that seems to be working for me:
$client = new Paylike('app-key-goes-here');
$merchant_id = 'merchant-id-goes-here';
$lines = $client->merchants()->lines()->find($merchant_id);
print_r($lines); // Cursor Object
Try to run this and let me know if it works. You can also run the tests in the library. There are some examples here: https://github.com/paylike/php-api/blob/master/tests/MerchantsLinesTest.php
It it working now :-)
Thank you very much for your fine support and programming :-)
Thank you for your kind words. If you have any other issues, feel free to ask. I will close this ticket.