twyple/twyple-sdk-php

本包最新版本(v1.2)没有提供许可证信息。

用于处理印度支付网关支付的简单PHP类

v1.2 2020-05-10 18:48 UTC

This package is auto-updated.

Last update: 2024-09-12 04:47:42 UTC


README

安装

composer require twyple/twyple-sdk-php

入门

创建一个端点并初始化包。您需要做的是读取输入数据并调用处理器。

Cashfree

http://your/server/route.php

<?php
   require 'vendor/autoload.php';
   use Twyple\Cashfree\Payments;
   $inputJSON = json_decode(file_get_contents('php://input'), true); //$inputJSON = $_POST;

   //cashfree credentials. You can get it from merchant dashboard
   $appId = "cashfreeAppID";
   $secretKey = "cashfreeAppSecret";

   $cashfree = new Payments($appId, $secretKey);

   $handlerRes = $cashfree->Handler($inputJSON);
   echo json_encode($handlerRes);

?>