PHP code example of wayforpay / php-sdk

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

    

wayforpay / php-sdk example snippets




$wizard->setServiceUrl('http://localhost:8000/examples/serviceUrl.php')

$wizard->setReturnUrl('http://localhost:8000/examples/returnUrl.php')
bash
# Install Composer
curl -sS https://getcomposer.org/installer | php
bash
php composer.phar 
bash
$ php examples/charge.php 
Status: InProcessing
bash
$ php examples/complete-3ds.php 
Status: Approved
bash
$ php examples/check.php 
Reason Code: 1100
Order status: Refunded
bash
$ php examples/refund.php 
Reason Code: 1100
Order status: Refunded