2017 © Pedro Peláez
 

library payconiq

Payconiq API client for PHP

image

eventsquare/payconiq

Payconiq API client for PHP

  • Saturday, April 14, 2018
  • by GlennEngelen
  • Repository
  • 2 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 10 % Grown

The README.md

Payconiq, (*1)

Payconiq API client for PHP

Accepting Payconiq payments with the use of the QR code., (*2)

Requirements

To use the Payconiq API client, the following things are required:, (*3)

  • Payconiq Merchant Id and Access Token
  • PHP >= 5.6
  • PHP cURL extension

Installation

The best way to install the Payconiq API client is to require it with Composer., (*4)

$ composer require eventsquare/payconiq

You may also git checkout or download all the files, and include the Payconiq API client manually., (*5)

Parameters

We use the following parameters in the examples below:, (*6)

$merchant_id = ''; // The merchant ID registered with Payconiq.
$access_token = ''; // Used to secure request between merchant backend and Payconiq backend.

$amount = 1000; // Transaction amount in cents
$currency = 'EUR'; // Currency
$callbackUrl = 'http://yoursite.com/postback'; // Callback where Payconiq needs to POST confirmation status

To learn more about how, when and what Payconiq will POST to your callbackUrl, please refer to the developer documentation right here., (*7)

Usage

Create a transaction

use Payconiq\Client;

$payconiq = new Client($merchant_id, $access_token);

// Create a new transaction
$transaction_id = $payconiq->createTransaction($amount, $currency, $callbackUrl);

// Assemble QR code content
$qrcode = 'https://payconiq.com/pay/1/' . $transaction_id;

Retrieve a transaction

use Payconiq\Client;

$payconiq = new Client($merchant_id, $access_token);

// Retrieve a transaction
$transaction = $payconiq->retrieveTransaction($transaction_id);

Laravel support

We have provided a service provider to use this class with Laravel > 5.1., (*8)

Add the following line to the Framework Service Providers in config/app.php, (*9)

Payconiq\Support\Laravel\PayconiqServiceProvider::class,

Add the following entry to the aliases, (*10)

'Payconiq' => Payconiq\Support\Laravel\PayconiqFacade::class,

Publish the Payconiq config file with the artisan command and fill in your credentials in the config/payconiq.php config file., (*11)

php artisan vendor:publish

Create a transaction

use Payconiq;

// Create a new transaction
$transaction_id = Payconiq::createTransaction($amount, $currency, $callbackUrl);

// Assemble QR code content
$qrcode = 'https://payconiq.com/pay/1/' . $transaction_id;

Retrieve a transaction

use Payconiq;

// Retrieve a transaction
$transaction = Payconiq::retrieveTransaction($transaction_id);

The Versions

14/04 2018

dev-master

9999999-dev

Payconiq API client for PHP

  Sources   Download

by Glenn Engelen

29/06 2017

1.0.2

1.0.2.0

Payconiq API client for PHP

  Sources   Download

by Glenn Engelen

29/06 2017

1.0.1

1.0.1.0

Payconiq API client for PHP

  Sources   Download

by Glenn Engelen