定制 rahulreghunath/nttdatapay 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rahulreghunath/nttdatapay

最新稳定版本:1.1.0-beta

Composer 安装命令:

composer require rahulreghunath/nttdatapay

包简介

nttdatapay payment gateway integration in laravel

README 文档

README

Laravel integration for NTT DATA PAY Payment gateway.

Installation

Install the package using using composer install.

composer require rahulreghunath/nttdatapay

Run the command to publish the configuration file.

php artisan vendor:publish --provider="Rahulreghunath\Nttdatapay\ServiceProvider"

Configuration

Set the credentials and configurations in config/nttdatapay.php file.

Configuration Description Required
encKey Encryption Key
decKey Decryption Key
payUrl Payment Url
transactionTrackingUrl Transaction Tracking Url
merchantId Merchant id
password Merchant Password

Please note that the configurations will be different for testing and production environments and will be provided by NTT DATA.

Usage

Create Token Id

use the method createTokenId($data) to create token id to initiate the payment request.

sample data

$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" => "user@email.com",
            "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);

Calling Javascript API

Use the Atom Token Id to call the javascript API

<button onclick="pay()">Pay</button>

<script src="CDN provided by NTT DATA"></script>

<script> 
    const pay=()=>{
        const options = {
            atomTokenId: "atomTokenId ", // token id get from atom
            merchId: "000000", // merchant id
            custEmail: "customer-email",
            custMobile: "customer-mobile",
            returnUrl: "your-response-url"
        }
        const atom = new AtomPaynetz(options,'uat');
    }
</script>

Mandatory JavaScript CDN link will be provided by NTT DATA and will be different for production and testing environments.

Check Transaction Status

check the status of the payment using transactionStatus($merTxn,$amt,$date) method.

$payment = new Atom();

$response = $payment->transactionStatus($merchantTransactionId,$amount,$date);

Decrypt Response

use decrypt($data) to decrypt the response message from Atom.

$payment = new Atom();

$jsonData = $payment->decrypt($encryptedData,$digest_algo="sha512");

default hashing algorithm used is sha512 and can be use different algorithm based as per NTT DATA's specifications.

统计信息

  • 总下载量: 26
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固