1. Go to this page and download the library: Download dann95/g2a-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/ */
/**
* to obtain hash and secret, go to:
* https://www.test.pay.g2a.com/setting/merchant (in case of SANDBOX)
* https://www.pay.g2a.com/setting/merchant (in case of PRODUCTION)
* email is your account e-mail.
*/
return [
'hash' => '',
'secret' => '',
'email' => '',
'environment' => 'SANDBOX', // SANDBOX || PRODUCTION
];
$sdk = app('G2A');
class FooBarController extends Controller
{
public function checkout(\G2A\Sdk $sdk)
{
dd($sdk);
}
}
bash
php artisan vendor:publish --tag=g2a
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.