PHP code example of parkwayprojects / paywithbank3d-php

1. Go to this page and download the library: Download parkwayprojects/paywithbank3d-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/ */

    

parkwayprojects / paywithbank3d-php example snippets


\ParkwayProjects\PayWithBank3D\Transaction::addBody('reference', time())
            ->addBody('amount', '100000')
            ->addBody('currencyCode', 'NGN')
            ->addBody('customer', [
                'name' => 'Edward Paul',
                'email' => '[email protected]',
                'phone' => '0848494839'
            ])
            ->addBody('returnUrl', 'https://infinitypaul.com')
            ->addBody('color', '#FF0000')
            ->addBody('metadata', [
                'orderId'=> '1234'
            ])->getAuthorizationUrl()->redirectNow();

\ParkwayProjects\PayWithBank3D\Transaction::verify();
bash
composer 
 php
$bank3d = \ParkwayProjects\PayWithBank3D\PayWithBank3D::setup('Public Key', 'Secret Key', 'staging');