wdwp / yandexmoney
PHP library for Yandex money forms and buttons api
Installs: 32
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/wdwp/yandexmoney
Requires
- php: >=5.6.0
This package is not auto-updated.
Last update: 2025-09-28 09:55:57 UTC
README
Installation
Install this package through Composer. To your composer.json
file, add:
{ "require": { "wdwp/yandexmoney": "^1.0" } }
Examples
Create payment:
use wdwp\yandexmoney\Payment; $payment = new Payment( '4100163332366', 'Payment', 100.0, 'shop', 'AC' ); $form = $payment->setFormcomment('Shop name') ->setDest('Payment for some goods') ->setLabel($order->id) ->setComment($order->comment) ->setSuccessUrl('http://yoursite.com/success.php') ->needFio(true) ->needEmail(true) ->needPhone(true) ->needAddress(true) ->getForm(); echo $form; // redirect to payment url $payment->send(); // get payment url $url = $payment->getUrl();
Check payment result:
// somewere in result url handler... ... use wdwp\yandexmoney\Payment; $result = Payment::validate($_POST, 'RX29rXHxOsR0exsBs6Hvi'); //secret word if ($result) { // payment is valid $order = Orders::find($result['label']); } ...
Success page:
... echo "Thank you for your payment!"; ...