Download the PHP package kevin365/tenpay without Composer

On this page you can find all versions of the php package kevin365/tenpay. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tenpay

tenpay

个人封装的一个composer组件,财付通支付组件 以及对应的QQ扫码支付组件

使用如下

include './vendor/autoload.php'; //财付通 $tenpay_config = array(
'partner' => '1486474181',
'key' => '4ff7a938fc9489b17f7b9b4f5127c59a',
'return_url' => 'http://baidu.com',
'notify_url' => 'http://baidu.com',
);
$pay = new kevin365\tenpay\Tenpay($tenpay_config);
$data['ordersn'] = date('YmdHis').uniqid();
$data['title'] = '测试商品';
$data['price'] = '1';
$pay->pay($data);

//QQ扫码
//入参
$params = array();
$params["out_trade_no"] = "20160512161914".uniqid();
$params["sub_mch_id"] = "";
$params["body"] = "body_test_中文";
$params["device_info"] = "WP00000001";
$params["fee_type"] = "CNY";
$params["notify_url"] = "https://10.222.146.71:80/success.xml";
$params["spbill_create_ip"] = "127.0.0.1";
$params["total_fee"] = "1";
$params["trade_type"] = "NATIVE";

//参数检测
//实际业务中请校验参数,本demo略
//
$pay_config = array(
'MCH_ID' => '1486419881', //QQ钱包商户号
'SUB_MCH_ID' => '', //子账户号
'MCH_KEY' => '21212', //api密钥
'CERT_FILE_PATH' => '', //证书私钥
'KEY_FILE_PATH' => '', //证书公钥
'NOTIFY_URL' => '', //成功回调地址
);

//api调用
$qpayApi = new \kevin365\tenpay\qpay\QpayMchAPI('https://qpay.qq.com/cgi-bin/pay/qpay_unified_order.cgi', null, 10,$pay_config);
$ret = $qpayApi->reqQpay($params);
$Qpay = new \kevin365\tenpay\qpay\QpayMchUtil();
print_r($Qpay->xmlToArray($ret));
//最后得到code_url生成二维码,用手机扫码可完成支付

composer地址

https://packagist.org/packages/kevin365/tenpay
"require":{
"kevin365/tenpay":"1.3"
},


All versions of tenpay with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kevin365/tenpay contains the following files

Loading the files please wait ....