1. Go to this page and download the library: Download sdkcodes/lara-paystack library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Sdkcodes\LaraPaystack\PaystackService;
class PaymentController{
/**
* Initiate bulk transfer and send money to multiple bank accounts at the same time
*/
public function doMultipleTransfers(Request $request, PaystackService $paystack){
// You can check this link for all fields that you can send to paystack https://developers.paystack.co/reference#initiate-bulk-transfer
$people = array(
[
'amount' => 50000,
'recipient' => 'RCP_m9yzgv4tbi6f20b'
],
[
'amount' => 20000,
'recipient' => 'RCP_z6b9zeky5z379dn'
]
);
$response = $paystack->initiateBulkTransfer($people);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.