YooMoney for MODX Revolution
How to install the module
- Click Apps — Installer in website's dashboard. A page with the list of packages will open.
- Click Download add-ons — Download the package.
- Download the archive containing the module (Select package — Download).
- Close the downloads window once its done. Find YooMoney on the page with the list of packages, and click Install — Installation options — Install package.
- Open the payment form chunk and enter ~
[[!YooMoney?&action=showMethods]]
in the list of payment methods. It looks like this:<select name="payment" style="width:200px;"> <option value="Upon receipt" [[!+fi.payment:FormItIsSelected=`Upon receipt`]]>Upon receipt</option> [[!YooMoney? &action=`showMethods` ]] </select>
- Open the checkout page chunk and add YooMoneyHook to the FormIt list of hooks, It looks like this:
[[!FormIt? &hooks=`spam,shk_fihook,YooMoneyHook,email,FormItAutoResponder,redirect` &submitVar=`order` &emailTpl=`shopOrderReport` &fiarTpl=`shopOrderReport` &emailSubject=`A new order placed at the "[[++site_name]]" online store` &fiarSubject=`You've placed an order at the "[[++site_name]]" online store` &emailTo=`[[++emailsender]]` &redirectTo=`25` &validate=`address:required,fullname:required,email:email:required,phone:required` &errTpl=`<br /><span class="error«>[[+error]]</span>` ]]
- Create a successful payment page and a payment error page.After that, you can set up payment acceptance via YooMoney.
How to enable payment acceptance via YooMoney
To set up payment acceptance using this manual, you need to sign up for YooMoney and get the
shopId
and Secret key
parameters.shopId
will appear in your Merchant Profile by itself when you sign up for the service,Secret key
is issued independently and requires activation in Merchant Profile.
Once you get both parameters, you can proceed with the configuration following this manual.
- Open the website's dashboard and select YooMoney in the left-hand menu (Elements tab in the Snippets section).
- Select the Parameters tab and click Default settings are blocked: this button unlocks the module settings so you can configure them.
- Fill out the module settings as in the table below.To edit any field, double-click on the value in the far right column.
account Don't change fail_page_id Indicate the ID of the page to show the user in case of payment failure method_cards Set Yes if the Bank cards payment method is provided for in your YooMoney contract method_cash Set Yes if the Cash payment method is provided for in your YooMoney contract method_sb Set Yes if the SberPay payment method is provided for in your YooMoney contract method_ym Set Yes if the YooMoney wallet payment method is provided for in your YooMoney contract modeIndicate Legal entity (payment method selection on the store's side) if you want all payment methods to be placed on your website.Indicate Legal entity (payment method selection on YooMoney's side) if you want all payment methods to be placed on YooMoney's side.password Indicate the Secret key
parameter in this field, you will need to issue and activate it in your YooMoney Merchant Profileshopid Indicate the shopId
parameter in this field, you can copy it from your YooMoney Merchant Profilesuccess_page_id Specify the ID of the page to show the user if the payment was successful tax_idIf you fiscalize payments using the YooMoney solution, select your VAT rate on the right.If you fiscalize payments independently (without the use of YooMoney), leave the field unchanged. More about the YooMoney's solution for Federal Law No. 54-FZyookassa_send_check Set Yes if you fiscalize using the YooMoney solution. More about the YooMoney's solution for Federal Law No. 54-FZ - Save the settings. That's it, now you can test payment acceptance.