juliocapuano/pay-simple-sdk

此包是PHP对PaySimple Api的简单实现

v1.3.5 2022-04-29 14:41 UTC

This package is auto-updated.

Last update: 2024-09-29 06:14:45 UTC


README

此包是PHP对PaySimple Api的简单实现

安装

您可以通过composer安装此包

composer require juliocapuano/pay-simple-sdk

用法

初始化客户端基础

$user_id ='<< PaySimple User ID >>';
$api_key ='<< PaySimple API Key >>';
$is_sanbox = true; // sanbox API for testing (optional)
$paysimple = new PaySimple\V4\PaySimple($user_id, $api_key,[$is_sanbox]);

访问方法

// instance
$paysimple = new PaySimple\V4\PaySimple($user_id, $api_key,[$is_sanbox]);

// primary methods for specific instances 
$customerServiceInstance = $paysimple->customers();
$accountServiceInstance = $paysimple->accounts();
$paymentServiceInstance = $paysimple->payments();
$merchantServiceInstance = $paysimple->merchant();
$recurrentPaymentServiceInstance = $paysimple->recurrentPayments();

// creating customer instance 
$customer_data =[...]; // array data 


$new_customer = $paysimple->customers()->new($customer_data);
// or
$new_customer = $customerServiceInstance->new($customer_data);

测试

composer test

鸣谢

许可证

MIT许可证(MIT)。请参阅许可证文件以获取更多信息。