PHP code example of bluedogtraining / pway
1. Go to this page and download the library: Download bluedogtraining/pway 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/ */
bluedogtraining / pway example snippets
$request = new \Pway\Request(87654321);
$request->ewayTotalAmount = 1000; // Ten dollars
$request->ewayCardHoldersName = 'Test Account';
$request->ewayCardNumber = '4444333322221111';
$request->ewayCardExpiryMonth = '12';
$request->ewayCardExpiryYear = '20';
$request->ewayCVN = '123';
$response = $request->send();
if ($response->isSuccessful()) {
echo "Thanks for your payment.";
} else {
echo "Error: ".$response->getStatus();
}