1. Go to this page and download the library: Download essam/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/ */
essam / 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
],
'merchant' => [
'id' => 'YOUR-MERCHANT-ID' //Include this when you are going to live
],
'redirect' => [
'url' => url('check_payment.php')
]
],$redirect);
$TapPay = new Payment(['secret_api_Key'=> $secret_api_Key]);
$Charge = $TapPay->getCharge($charge_id);