承接 mitalcoi/php-webmoney 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

mitalcoi/php-webmoney

最新稳定版本:v0.10.3

Composer 安装命令:

composer require mitalcoi/php-webmoney

包简介

WebMoney API PHP Library

README 文档

README

Packagist Dependency Status Packagist Packagist

Get transparent object-oriented interaction with WebMoney API.

If you just need to sign your requests to the API, use WebMoney Signer, a native PHP implementation of the WMSigner authentication module.

XML-interfaces supported

  • X2: transferring funds from one purse to another
  • X3: receiving transaction history, checking transaction status
  • X6: sending message to any WM-identifier via internal mail
  • X8: retrieving information about purse ownership, searching for system user by his/her identifier or purse
  • X9: retrieving information about purse balance
  • X11: retrieving information from client’s passport by WM-identifier
  • X14: fee-free refund
  • X17: operations with arbitration contracts
  • X18: getting transaction details via merchant.webmoney
  • X19: verifying personal information for the owner of a WM identifier

Megastock interfaces supported

Requirements

The library requires PHP 5.3 compiled with cURL extension (but you can override cURL dependencies).

Installation

  1. Install Composer:

    curl -sS https://getcomposer.org/installer | php
    
  2. Add the php-webmoney dependency:

    php composer.phar require baibaratsky/php-webmoney:0.10.*
    

Usage

There are more usage examples in the project wiki.

require_once(__DIR__ . '/vendor/autoload.php'); // Require autoload file generated by composer

use baibaratsky\WebMoney;
use baibaratsky\WebMoney\Signer;

$webMoney = new WebMoney\WebMoney(new WebMoney\Request\Requester\CurlRequester);

$request = new WebMoney\Api\X\X9\Request;
$request->setSignerWmid('YOUR WMID');
$request->setRequestedWmid('REQUESTED WMID');

$request->sign(new Signer('YOUR WMID', 'FULL PATH TO KEY FILE', 'KEY FILE PASSWORD'));

if ($request->validate()) {
    /** @var WebMoney\Api\X\X9\Response $response */
    $response = $webMoney->request($request);

    if ($response->getReturnCode() === 0) {
        echo $response->getPurseByName('Z000000000000')->getAmount();
    }
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-05-20