idealogica/payssion-php

此包的最新版本(1.3.0.1)没有提供许可证信息。

payssion/payssion-php composer 适配

1.3.0.1 2020-08-02 05:33 UTC

This package is auto-updated.

Last update: 2024-09-29 05:29:12 UTC


README

## 前提条件

  • PHP 5.3 或更高版本
  • curl、json & openssl 扩展必须启用

## 使用方法

$payssion = new PayssionClient('your api key', 'your secretkey');
//please uncomment the following if you use sandbox api_key
//$payssion = new PayssionClient('your api key', 'your secretkey', false);

$response = null;
try {
	$response = $payssion->create(array(
			'amount' => 1,
			'currency' => 'USD',
			'pm_id' => 'alipay_cn',
			'order_id' => 'your order id',      //your order id
			'return_url' => 'your return url'   //optional, the return url after payments (for both of paid and non-paid)
	));
} catch (Exception $e) {
	//handle exception
	echo "Exception: " . $e->getMessage();
}

if ($payssion->isSuccess()) {
	//handle success
} else {
	//handle failed
}

PAYSSION PHP 库