wdwp/yandexmoney 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wdwp/yandexmoney

Composer 安装命令:

composer require wdwp/yandexmoney

包简介

PHP library for Yandex money forms and buttons api

README 文档

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!";
...

统计信息

  • 总下载量: 32
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-01-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固