How to get new Transactions?
kesavanselvakani opened this issue · 1 comments
kesavanselvakani commented
Hi Team,
How to get latest transaction details in Mango pay
$mangoPayApi = new \MangoPay\MangoPayApi();
$mangoPayApi->Config->ClientId = config('app.project.MangoPay.ClientId');
$mangoPayApi->Config->ClientPassword = config('app.project.MangoPay.ClientPassword');
$mangoPayApi->Config->TemporaryFolder = config('app.project.MangoPay.TemporaryFolder');
$mangoPayApi->Config->BaseUrl = config('app.project.MangoPay.URL');
$page_test = 100;
$pagination = new \MangoPay\Pagination($page,$page_test); // get 1st page, 10 items per page
$wallet_transactions_details = $mangoPayApi->Wallets->GetTransactions($wallet_id,$pagination,$sorting);
This code display only for past 100 transaction...Recent transaction how to get
iulian03 commented
You can adjust pagination to fetch data based on your needs. Also, you can add sorting to the request.
$sorting = new Sorting();
$sorting->AddField("CreationDate", SortDirection::DESC);