websystem/gp-webpay-sdk is a Laravel package for this is my package gp-webpay-sdk.
It currently has 0 GitHub stars and 12 downloads on Packagist (latest version 0.1.3).
Install it with composer require websystem/gp-webpay-sdk.
Discover more Laravel packages by websystem
or browse all Laravel packages to compare alternatives.
Last updated
This package provides a simple way to integrate GPWebpay payment gateway into Laravel applications.
composer require websystem/gp-webpay-sdk
php artisan vendor:publish --tag=webpay-config
Save the following environment variables to the .env file in the root directory of the project.
Locate your keys and certificates in the storage directory.
GPWEBPAY_PRIVATE_KEY_PATH= # Storage path to the private key
GPWEBPAY_PRIVATE_KEY_PASSWORD= # Password for the private key
GPWEBPAY_PUBLIC_KEY_PATH= # Storage path to the public key
GPWEBPAY_MERCHANT_NUMBER= # Merchant number
GPWEBPAY_URL=https://test.3dsecure.gpwebpay.com/pgw/order.do
GPWEBPAY_ADD_INFO_SCHEMA= # Storage path to the additional info schema
use Websystem\Gpwebpay\Enums\Currency;
use Websystem\Gpwebpay\Facades\Gpwebpay;
$paymentData = [
'orderNumber' => 1001, # Unique order number
'amount' => 150.50, # Float value
'currency' => Currency::EUR,
'depositFlag' => 1,
'returnUrl' => 'https://example.com/callback',
'addInfo' => [
'name' => 'John Doe',
'email' => '[email protected]',
],
'addInfoSchemaPath' => config('gpwebpay.add_info_schema'),
];
$requestUrl = Gpwebpay::createPaymentRequestUrl($paymentData);
return redirect($requestUrl);
This library originates from adamstipak/webpay-php. I have adapted it into a package for Laravel and made slight code modifications.