`<?Php
require_once(DIR . '/vendor/autoload.php'); // Require autoload file generated by composer
use baibaratsky\WebMoney\WebMoney;
use baibaratsky\WebMoney\Signer;
use baibaratsky\WebMoney\Request\Requester\CurlRequester;
use baibaratsky\WebMoney\Api\X\X2;
$webMoney = new WebMoney(new CurlRequester);
$request = new X2\Request;
$request->setSignerWmid('');//my wmid
$request->setTransactionExternalId(1347384738784); // Unique ID of the transaction in your system
$request->setPayerPurse('');//z00000.. my purse
$request->setPayeePurse('');//z0000.. receiver purse
$request->setAmount(0.1); // Payment amount
$request->setDescription('Test payment');
`<?Php require_once(DIR . '/vendor/autoload.php'); // Require autoload file generated by composer use baibaratsky\WebMoney\WebMoney; use baibaratsky\WebMoney\Signer; use baibaratsky\WebMoney\Request\Requester\CurlRequester; use baibaratsky\WebMoney\Api\X\X2; $webMoney = new WebMoney(new CurlRequester);
$request = new X2\Request; $request->setSignerWmid('');//my wmid $request->setTransactionExternalId(1347384738784); // Unique ID of the transaction in your system $request->setPayerPurse('');//z00000.. my purse $request->setPayeePurse('');//z0000.. receiver purse $request->setAmount(0.1); // Payment amount $request->setDescription('Test payment');
$request->sign(new Signer('my wmid', './key.kwm', 'pass'));
if ($request->validate()) { /* @var X2\Response $response / $response = $webMoney->request($request);
} else { echo 'issue here Request errors: ' . PHP_EOL; foreach ($request->getErrors() as $error) { echo ' - ' . $error . PHP_EOL; } } ?>`
I used this code and output error is 'Payment error: create error step=14'