Download the PHP package orkhanahmadov/goldenpay without Composer
On this page you can find all versions of the php package orkhanahmadov/goldenpay. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download orkhanahmadov/goldenpay
More information about orkhanahmadov/goldenpay
Files in orkhanahmadov/goldenpay
Package goldenpay
Short Description GoldenPay payment library for PHP and Laravel framework
License MIT
Informations about the package goldenpay
:credit_card: GoldenPay library for PHP
If you are using Laravel, you can use laravel-goldenpay
package instead for better integration with extra features.
Requirements
PHP 7.2 or higher, with json
extension.
Installation
Usage
First, instantiate Orkhanahmadov\Goldenpay\Goldenpay
and call authenticate()
method with "auth key" and "merchant name". Both can be acquired from Goldenpay merchant dashboard.
Getting payment key
To get new payment key use payment
method.
Method accepts following arguments:
- Amount - Amount to charge. Only integer accepted. For example 10.25 needs to be converted to 1025
- Card type - Requires instance of
Orkhanahmadov\Goldenpay\Enums\CardType
.CardType::VISA()
for VISA,CardType::MASTERCARD()
for MasterCard - Description - Payment related description
- Language (optional) - Sets payment page interface language. Requires instance of
Orkhanahmadov\Goldenpay\Enums\Language
.Language::EN()
for english,Language::RU()
for russian,Language::AZ()
for azerbaijani. Default is azerbaijani
Method will return instance of Orkhanahmadov\Goldenpay\Response\PaymentKey
. You can access payment key and payment url from this object instance.
Important! Goldenpay charges all payments only in AZN.
Checking payment result
To check payment result use result
method.
Method accepts following arguments:
- Payment key - Previously available payment key
Method also accepts instance of Orkhanahmadov\Goldenpay\Response\PaymentKey
as an argument.
Method will return instance of Orkhanahmadov\Goldenpay\Response\PaymentResult
. You can access following properties from this object instance:
You can also use global helper function. Calling this function requires passing "auth key" and "merchant name".
Orkhanahmadov\Goldenpay\Goldenpay
implements Orkhanahmadov\Goldenpay\GoldenpayInterface
. You can use this interface as abstraction for dependency injection.
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Orkhan Ahmadov
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of goldenpay with dependencies
ext-json Version *
guzzlehttp/guzzle Version ^6.5|^7.0
myclabs/php-enum Version ^1.8