peachpayments/payment-links

Peach Payments - Payment Links SDK.

v1.0.0 2022-10-12 11:18 UTC

This package is auto-updated.

Last update: 2024-12-12 17:03:39 UTC


README

Requirements

PHP 7.4.0 and later.

Composer

You can install the sdk via Composer. Run the following command:

composer require peach/peach-payment-php

To use the sdk, use Composer's autoload:

require_once('vendor/autoload.php');

Manual Installation

If you do not wish to use Composer, you can download the latest release. Then, to use the sdk, include the init.php file.

require_once('/path/to/peach-payment-php/init.php');

Dependencies

The sdk require the following extensions in order to work properly:

If you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that these extensions are available.

Getting Started

Simple usage looks like:

const CLIENT_ID = "";
const CLIENT_SECRET = "";
const MERCHANT_ID = "";
const ENTITY_ID = "";

$ppay = new \PeachPayments\PaymentLinksClient(new \PeachPayments\AuthDetails(CLIENT_ID, CLIENT_SECRET, MERCHANT_ID));
$response = $ppay->payment->create(ENTITY_ID, [
    ...PaymentDetails
]);

print_r($response);

Other examples can be found in the Examples Directory

Development

Testing