PHP code example of rahulreghunath / nttdatapay
1. Go to this page and download the library: Download rahulreghunath/nttdatapay 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/ */
rahulreghunath / nttdatapay example snippets
$data = [
"payInstrument" => [
"headDetails" => [
"version" => "OTSv1.1",
"api" => "AUTH",
"platform" => "FLASH"
],
"merchDetails" => [
"merchTxnId" => "Test123450",
"merchTxnDate" => "2021-09-04 20:46:00"
],
"payDetails" => [
"amount" => "1",
"product" => "PRODUCT", // optional value
"custAccNo" => "ACC NO", // optional value
"txnCurrency" => "INR"
],
"custDetails" => [
"custEmail" => "[email protected] ",
"custMobile" => "0000000000"
],
"extras" => [
"udf1" => "", // optional value
"udf2" => "", // optional value
"udf3" => "", // optional value
"udf4" => "", // optional value
"udf5" => "" // optional value
]
]
];
$payment = new Atom();
$atomTokenId = $payment->createTokenId($data);
$payment = new Atom();
$response = $payment->transactionStatus($merchantTransactionId,$amount,$date);
$payment = new Atom();
$jsonData = $payment->decrypt($encryptedData,$digest_algo="sha512");
shell
php artisan vendor:publish --provider="Rahulreghunath\Nttdatapay\ServiceProvider"