sfPaymentWebMoneyPlugin
===============
**WARNING : This plugin is in alpha state, therefore NOT READY for production.
It still needs contribution to be fully functional.**
**NOTE : You need to install [sfPaymentPlugin](http://www.symfony-project.org/plugins/sfPaymentPlugin )**
The `sfPaymentWebMoneyPlugin` is intended to ease integration with webmoney payment
service.
Installation
------------
* Install the plugin
$ symfony plugin:install sfPaymentWebMoneyPlugin --stability=alpha
* Clear you cache
$ symfony cc
Usage
-----
At first, you need to configure the plugin by editing `config/app.yml` file. You have to change
the `vendor_purse`, `secret_key`, because they depends on your webmoney references. Also
you can change default module actions and validation algorithm(now only MD5 is supported).
When the plugin is ready!
Create a payment form. It can be done by `BasesfPaymentWebMoneyActions::executePayForm()` method.
Optional parameters, such as user_id or order_id can be added too.
Results from WebMoney processed in `BasesfPaymentWebMoneyActions::executeIpn()` method.
If payment is valid transactionCompleted will called.
SIGN validation
---------------
There are two possible means to verify payment. One of this is SIGN method.
It's more complicated than MD5 method, but I guess more reliable.
And It needs a WebMoney Keeper Classic. I haven't install it yet.
So that's how it works:
1. **DONE** Make a string by sticking the parameters received in the â€˜Payment notification formâ€™ in the same order as at the control signature generation (see above). Remember that the Secret Key is used to generate the signature.
2. **There is ready PHP-lib** Verify the digital signature. Use `Interface X7`. Specify the following parameters:
* TesterWMID â€“ WM identifier of the merchant;
* ClientWMID â€“ WM identifier of Merchant WebMoney Transfer that generates the digital signature of the
payment notification. Its number is 967909998006.
* AccessMarker -string received at the first stage of sticking parameters of the â€™Payment notification
form â€™;
* ClientSignStr â€“ control signature generated by Merchant WebMoney Transfer and transmitted to the website of the merchant in the â€˜Payment notification formâ€™ (the â€˜LMI_HASHâ€™ parameter);
* SignStr â€“ digital signature of the request.
Tests
-----
Test is written for use with `sfPHPUnit2Plugin`
TODO
----
* Complete SIGN validation
* Example of using system with users
* Get feedbacks for this first version and improve plugin consistency
Links
-----
* [Official WebMoney documentation](https://wiki.wmtransfer.com/wiki/show/Web_Merchant_Interface)
* [Additional libraries](https://wiki.wmtransfer.com/wiki/show/WMSigner)