2017 © Pedro Peláez
 

library yandexmoney

PHP library for Yandex money forms and buttons api

image

wdwp/yandexmoney

PHP library for Yandex money forms and buttons api

  • Tuesday, January 16, 2018
  • by wdwp
  • Repository
  • 0 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

yandexmoney

Installation

Install this package through Composer. To your composer.json file, add:, (*1)

{
    "require": {
        "wdwp/yandexmoney": "^1.0"
    }
}

Examples

Create payment:, (*2)

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:, (*3)

// 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:, (*4)

...
echo "Thank you for your payment!";
...

The Versions

16/01 2018

dev-master

9999999-dev https://github.com/wdwp/yandexmoney

PHP library for Yandex money forms and buttons api

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by Yuri Haperski

payment yandex

16/01 2018

v1.0

1.0.0.0 https://github.com/wdwp/yandexmoney

PHP library for Yandex money forms and buttons api

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by Yuri Haperski

payment yandex