1. Go to this page and download the library: Download nigel/contipay-php 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/ */
nigel / contipay-php example snippets
use Contipay\Core\Contipay;
use Contipay\Helpers\Payload\PayloadGenerator;
www.contipay.co.zw/api/success";
$cancelUrl = "https://www.contipay.co.zw/api/cancel";
$merchantCode = 00;
$phone = "2637****340";
$amount = (float) 10;
$contipay = new Contipay(
'token-here', // copy from .env or paste directly
'secret-here', // copy from .env or paste directly
);
$contipay = new Contipay(
'token-here', // copy from .env or paste directly
'secret-here', // copy from .env or paste directly
);
// Update URLs if necessary
$contipay->updateURL('dev-url', 'live-url');
// Process payment with the updated URLs
$res = $contipay
->setAppMode("DEV") // LIVE as another option
->setPaymentMethod()
->process($payload);
header('Content-type: application/json');
echo $res;
bash
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.