1. Go to this page and download the library: Download contipay/php-sdk 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/ */
contipay / php-sdk example snippets
use ContiPay\PhpSdk\Card;
use ContiPay\PhpSdk\Mobile;
'your_api_secret');
// update Contipay URL (optional)
$contipay->updateContipayURL('new-dev-url', 'new-live-url');
// Process a payment
$response = $contipay->mobile([
'amount' => '50.00',
'currency' => 'ZWG',
'phone' => '0782000340',
'reference' => uniqid('PAY-'),
'provider' => 'EcoCash',
'code' => 'EC'
]);
OR
// Initialize the SDK
$contipay = new Card('your_api_key', 'your_api_secret');
// Process a payment
$response = $contipay->card([
'accountNumber' => '4111111111111111',
'accountExpiry' => '12/26',
'cvv' => '123',
'phone' => '0782000340',
'amount' => '50.00',
'currency' => 'USD',
'reference' => uniqid('CARD-'),
'provider' => 'Visa',
'code' => 'VA'
]);
use ContiPay\PhpSdk\Mobile;
use ContiPay\PhpSdk\Card;
$mode, $method);
// Card payments
$card = new Card($apiKey, $apiSecret, $mode, $method);