- a unique number of transfer in the WebMoney system
=item * C - a service number of transfer in the WebMoney system
=item * C - 0 - simple (completed), 12 - protected (funds were refunded)
=item * C - Date and time of transaction status change
=back
=head2 reject_protect - reject code-protected transaction (Interface X13)
$wm->reject_protect(
reqn => 13,
wmtranid => '123123123', # Transfer number in the WebMoney system (mandatory)
) or die $wm->errstr;
On error returns undef. On success returns reference to confirmation hash:
=over 4
=item * C - a unique number of transfer in the WebMoney system
=item * C| - a service number of transfer in the WebMoney system
=item * C - 0 - simple (completed), 4 - protected (incomplete), 12 - protected (funds were refunded)
=item * C - Date and time of transaction status change
=back
=head2 message - send message to arbitrary WMID (Interface X6)
$wm->message(
reqn => 18,
receiverwmid => '000000000000', # Recipient's WMID, 12 digits (mandatory)
msgsubj => 'Foo', # Subject, 0 - 255 characters without spaces in the beginning and in the end (mandatory)
msgtext => 'Bar', # Message body, 0 - 1024 characters without spaces in the beginning and in the end (mandatory)
) or die $wm->errstr;
On error returns undef. On success returns reference to confirmation hash.
=head2 balance - check purses balance (Interface X9)
my $purses = $wm->get_balance(
reqn => 16,
wmid => '000000000000', # WMID, 12 digits (mandatory)
) or die $wm->errstr;
On error returns undef. On success returns reference to array of purses. Each purse is a hash:
=over 4
=item * C - a unique internal number of the purse
=item * C - Purse number, A letter prefix + 12 digits
=item * C - Purse balance
=back
=head2 get_in_invoices - get incoming invoices list (Interface X10)
my $invs = $wm->get_in_invoices(
reqn => 15,
wmid => '000000000000', # WMID (mandatory)
wminvid => 456456456, # Invoice number (in the WebMoney system), An integer >= 0 (optional)
datestart => '20080101 00:00:00', # Minimum time and date of invoice creation (mandatory)
datefinish => '20090101 00:00:00', # Maximum time and date of invoice creation (mandatory)
) or die $wm->errstr;
On error returns undef. On success returns reference to array of invoices. Each invoice is a hash:
=over 4
=item * C - a unique number of a invoice in the WebMoney system
=item * C - a service number of a invoice in the WebMoney system
=item * C - Invoice number set by the sender
=item * C - Seller's WMID
=item * C - Number of the purse where funds will be sent to
=item * C - Amount that the customer is to pay
=item * C - Description of product or service
=item * C - Delivery address
=item * C - Maximum period of protection in days
=item * C - Maximum valid period in days
=item * C - 0 - unpaid, 1 - paid with protection, 2 - paid, 3 - rejected
=item * C - Date and time of the invoice creation
=item * C - Date and time of the invoice status change
=item * C - Transaction number in the WebMoney system, if the invoice was paid
=back
=head2 money_back - return money without commission (Interface X14)
$wm->money_back(
reqn => 19,
inwmtranid => '123123123', # Transaction ID (mandatory)
amount => 100, # Amount of transaction (self-check). Must match the transaction being returned (mandatory)
) or die $wm->errstr;
On error returns undef. On success returns reference to confirmation hash.
=head1 SECURITY
=over 4
=item *
The module is bundled with WebMoney CA certificate to validate identity of the WebMoney server.
=item *
Be especially careful when using certificate with money transfer permission on the production servers. Stolen certificate can be easily reimported to the browser and used to steal your money.
To prevent such threats register separate WMID and give it permission to access purses of the main WMID in read-only mode. This can be set up using L
=back
=head1 ENVIRONMENT
=over 4
=item * C - proxy support, http://host_or_ip:port
=item * C and C - proxy basic auth
=back
=head1 BUGS
The module is not thread-safe.
=head1 SEE ALSO
C - signer module that signs any data using specified WebMoney key file
L - WebMoney API specification
=head1 AUTHOR
Alexander Lourier, Eaml@rulezz.ruE
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2008 by Alexander Lourier
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.10.0 or,
at your option, any later version of Perl 5 you may have available.
=cut
| |