PHP code example of eventsquare / payconiq

1. Go to this page and download the library: Download eventsquare/payconiq library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

eventsquare / payconiq example snippets


$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

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;

use Payconiq\Client;

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

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

Payconiq\Support\Laravel\PayconiqServiceProvider::class,

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

php artisan vendor:publish

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;

use Payconiq;

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