PHP code example of jitoot / airwallex-php-api
1. Go to this page and download the library: Download jitoot/airwallex-php-api 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/ */
jitoot / airwallex-php-api example snippets
//pass in the client ID and API key from airwallex
$airwallex = new \Jitoot\Airwallex\Client([
'clientId' => 'sample_client_id',
'apiKey' => 'sample_api_key',
'production' => true,
]);
//parameters
$response = $airwallex->paymentIntent->create([
'description' => 'example customer',
'email' => '[email protected]',
'payment_method' => 'pm_card_visa',
]);
//response array consists of response code and body
//$response[0] = 200
//$response[1] = [ data ]
bash
composer