juliocapuano/pay-simple-sdk

This package is a simple implementation of the PaySimple Api for PHP

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

This package is auto-updated.

Last update: 2025-04-29 01:12:50 UTC


README

This package is a simple implementation of the PaySimple Api for PHP

Installation

You can install the package via composer:

composer require juliocapuano/pay-simple-sdk

Usage

Init the client base

$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]);

Accessing to methods

// 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);

Testing

composer test

Credits

License

The MIT License (MIT). Please see License File for more information.