2017 © Pedro Peláez
 

library paymentpage-sdk

Ecommpay SDK

image

ecommpay/paymentpage-sdk

Ecommpay SDK

  • Friday, July 20, 2018
  • by zhukovra
  • Repository
  • 2 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 4 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

EcommPay PHP SDK

Build Status Test Coverage Maintainability, (*1)

This is a set of libraries in the PHP language to ease integration of your service with the EcommPay Payment Page., (*2)

Please note that for correct SDK operating you must have at least PHP 7.0., (*3)

Payment flow

Payment flow, (*4)

Installation

Install with composer, (*5)

composer require ecommpay/paymentpage-sdk

Get URL for payment

$gate = new ecommpay\Gate('secret');
$payment = new ecommpay\Payment('11', 'some payment id');
$payment->setPaymentAmount(1000)->setPaymentCurrency('RUB');
$url = $gate->getPurchasePaymentPageUrl($payment);

$url here is the signed URL., (*6)

If you want to use another domain for URL you can change it with optional Gate constructor parameter:, (*7)

new ecommpay\Gate('secret', 'https://mydomain.com/payment');

or change it with method, (*8)

$gate->setPaymentBaseUrl('https://mydomain.com/payment');

Handle callback from Ecommpay

You'll need to autoload this code in order to handle notifications:, (*9)

$gate = new ecommpay\Gate('secret');
$callback = $gate->handleCallback($data);

$data is the JSON data received from payment system;, (*10)

$callback is the Callback object describing properties received from payment system; $callback implements these methods: 1. Callback::getPaymentStatus(); Get payment status. 2. Callback::getPayment(); Get all payment data. 3. Callback::getPaymentId(); Get payment ID in your system., (*11)

TODO

  • [x] Payment Page opening
  • [x] Notifications handling
  • [ ] Direct Gate requests
  • [ ] PHPDoc

The Versions

20/07 2018

dev-sdk-1488

dev-sdk-1488

Ecommpay SDK

  Sources   Download

The Development Requires

by Roman Zhukov

12/07 2018

dev-master

9999999-dev

Ecommpay SDK

  Sources   Download

The Development Requires

by Roman Zhukov