Skip to content

italiamultimedia/gestpay

Repository files navigation

italiamultimedia/gestpay

GestPay REST API Implementation


Installation

composer require italiamultimedia/gestpay

Usage

Payment API

\ItaliaMultimedia\GestPay\Payment

Create Payment

$payment = new \ItaliaMultimedia\GestPay\Payment($apiKey, $logDir);
// Set environment (optional, defaults to 'Environment::SANDBOX')
$payment->setEnvironment(\ItaliaMultimedia\GestPay\Environment::SANDBOX);
// Set currency (optional, defaults to `Currencies::EUR`)
$payment->setCurrency(\ItaliaMultimedia\GestPay\Currencies::EUR);
// Set shopLogin
$payment->setShopLogin($shopLogin);
// Set itemType (digital/physical)
$payment->setItemType('digital');
// Create payment
$result = $payment->create($amount, $shopTransactionId);
Example

examples/paymentCreate.php

php examples/paymentCreate.php <apiKey> <shopLogin>

Lightbox example

examples/lightbox.php

See Gestpay documentation: Using Lightbox solution

About

GestPay REST API Implementation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages