1. Go to this page and download the library: Download haggag/laravel-tap-payment 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/ */
haggag / laravel-tap-payment example snippets
$TapPay = new Payment(['secret_api_Key'=> $secret_api_Key]);
$redirect = false; // return response as json , you can use it form mobile web view application
return $TapPay->charge([
'amount' => 200,
'currency' => 'AED',
'threeDSecure' => 'true',
'description' => 'test description',
'statement_descriptor' => 'sample',
'customer' => [
'first_name' => 'customer',
'email' => '[email protected]',
],
'source' => [
'id' => 'src_card'
],
'post' => [
'url' => null
],
'redirect' => [
'url' => url('check_payment.php')
]
],$redirect);
$TapPay = new Payment(['secret_api_Key'=> $secret_api_Key]);
$Charge = $TapPay->getCharge($charge_id);