californiamountainsnake / php-yandex-payment
This package is abandoned and no longer maintained.
No replacement package was suggested.
This is a simple php library for handling Yandex.Money payments
1.0.1
2019-03-28 15:02 UTC
Requires
- php: ^7.3.1
Requires (Dev)
- ext-dom: *
- phpunit/phpunit: ^7.0
This package is auto-updated.
Last update: 2022-05-28 22:31:18 UTC
README
This is a simple php library for handling Yandex.Money payments!
Install:
Require this package with Composer
Install this package through Composer.
Edit your project's composer.json
file to require californiamountainsnake/php-yandex-payment
:
{ "name": "yourproject/yourproject", "type": "project", "require": { "php": "^7.3.1", "californiamountainsnake/php-yandex-payment": "*" } }
and run composer update
or
run this command in your command line:
composer require californiamountainsnake/php-yandex-payment
Usage examples:
<?php use CaliforniaMountainSnake\PhpYandexPayment\HttpPaymentNotice\YandexHttpPaymentNotice; use CaliforniaMountainSnake\PhpYandexPayment\Exceptions\PaymentException; try { $secretToken = 'your_secret_yandex_http_notice_token'; $notice = new YandexHttpPaymentNotice($_POST, $secretToken); } catch (PaymentException $e) { return $e->getMessage(); } // If we didn't get exceptions above it means that a payment is correct and we can get payment details. $notice->getAmount(); $notice->getCurrency(); $notice->getLabel();