Cloudipsp php sdk v2
Payment service provider
A payment service provider (PSP) offers shops online services for accepting electronic payments by a variety of payment methods including credit card, bank-based payments such as direct debit, bank transfer, and real-time bank transfer based on online banking. Typically, they use a software as a service model and form a single payment gateway for their clients (merchants) to multiple payment methods. read more
This SDK uses composer.
Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.
For more information on how to use/install composer, please visit https://github.com/composer/composer
composer require cloudipsp/php-sdk-v2
git clone -b master https://github.com/cloudipsp/php-sdk-v2.git
<?php require '/path-to-sdk/autoload.php';
require 'vendor/autoload.php'; \Cloudipsp\Configuration::setMerchantId(1396424); \Cloudipsp\Configuration::setSecretKey('test'); $checkoutData = [ 'currency' => 'USD', 'amount' => 1000 ]; $data = \Cloudipsp\Checkout::url($data); $url = $data->getUrl(); //$data->toCheckout() - redirect to checkout
To check it you can use build-in php server
cd ~/php-sdk-v2 php -S localhost:8000