Using the Rocketpay for Bitrix CMS plug-in
This section describes how to use the Rocketpay plug-in version 1.0. The plug-in allows you to perform payments by using Rocketpay payment solutions on the sites based on Bitrix CMS. Small Business, Business, and Enterprise revisions are supported.
Operation workflow
Payments are processed by using the Rocketpay payment page.
Figure: The diagram of payment processing with the plug-in enabled
Request for opening the payment page is automatically generated by the plug-in when Rocketpay is selected as the payment method.
If the payment is declined, the customer may re-enter the data on the payment page.
Upon receipt of the payment result, a callback is sent back to the merchant site. The callback is processed by the plug-in automatically. The status of the order changes depending on the payment result. The correspondence between payment results and order statuses of the order is configured in the Bitrix CMS settings.
Installing and setting up
Installing the plug-in
To install the plug-in, do the following:
- Download file with the Rocketpay plug-in here.
- Open Bitrix CMS.
- Select .
- Add a
rocketpay
folder inside thebitrix/modules
folder. - Select .
- Click the Install button next to Rocketpay.
Once the plug-in is installed, its status changes to Installed.
Callbacks
To automatically change the payment status of the order, you need to set up receiving callbacks from Rocketpay.
To set up receiving callbacks:
- Add a
PHP
file into the following section: .Copy the following code to the PHP file:
<? $APPLICATION->IncludeComponent( "bitrix:sale.order.payment.receive", "", Array( "PAY_SYSTEM_ID_NEW" => "7" ) ); ?>
The
PAY_SYSTEM_ID_NEW
parameter is the ID of the Rocketpay payment system in the Bitrix CMS. You can find this ID in the following section: . - Give the Rocketpay technical support the URL you will use to receive callbacks.
If you place the
rocketpay.php
file into the root directory of your site, the URL for receiving callbacks will look like this:https://<full_domain_name>/rocketpay.php
If the
rocketpay.php
file is located not in the root directory of your site, the URL for receiving callbacks will look like this:https://<full_domain_name>/<directory>/rocketpay.php
Testing
Once the plug-in is activated, you can use the test mode. With the test mode, you can learn how to use the plug-in without making actual payments. The test mode will allow you to configure and test the plug-in, perform test orders, and view order information. When running in test mode, the payment page displays the corresponding warning.
Configuration
- Check module status in the following section: Installed . The status must be
- Select
- Select
Rocketpay
in the dropdown list and click Modify - Configure the required settings. See below for details
- Select Yes in the Test mode box
- Click Save
- Parameters that govern how the Rocketpay payment page is displayed:
- Active—Rocketpay is displayed as a payment method on the site
- Description—payment method description to show on the site
- Payment system logo—the payment method logo
-
Open in new window and Modal mode parameters control the display mode. The combination of these parameters allows you to choose one of the three display modes: in an iframe, in a modal window, or in a separate browser tab.
Iframe display mode: clear the Open in new window checkbox and select No in Modal mode.
Modal window display mode: clear the Open in new window checkbox and select Yes in Modal mode.
Separate browser tab display mode: select the Open in new window checkbox and select No in Modal mode
- Display the page of selecting a payment method—configure the payment method selection page
- Additional params—additional parameters of the payment page.
A list of these parameters is available here. When specifying these parameters, select Value. To specify two or more parameters, use "&" as separator
- Terminal language—the language of the payment page. Select Value, and then enter the language code according to ISO 639-1 alpha-2
- Parameters Project ID and Secret salt are required to communicate with Rocketpay payment solutions. These parameters are not used in the test mode.
Making test orders
Once the parameters of the plug-in are configured, you can make test orders on the site and check the orders information in Bitrix CMS in the section.
Launching
Once you done with testing the plug-in by using all the payment methods you plan to use, switch to production mode. To do so, you need to get all the information required for the production mode and configure the plug-in settings accordingly.
Receiving the parameters for the production mode
To receive the parameters to integrate with the Rocketpay payment solutions, do the following:
- Contact Rocketpay technical support and provide the following parameters:
- The site name and site URL
- The payment page currency
- The URL to receive callbacks
- Receive from Rocketpay technical support the following parameters:
- Project ID—site identifier
- Secret salt—secret key that is generated for a particular merchant in the Rocketpay processing system
Configuring the operational parameters
- Open Bitrix CMS
- Select
- Select Rocketpay and configure the operational parameters:
- Make sure, that the Activity checkbox is selected
- Select No in Test mode
- Enter values for Project ID and Secret salt which you received from Rocketpay technical support
- Make sure that the remaining parameters are set as required
- Click Save.
Using
Once the plug-in is launched, it operates autonomously.
We recommend that you control orders by reviewing the information in the
section; also make sure that order numbers are unique within the site. The payment page would not open for duplicate order numbers.If you need to temporary switch the plug-in back to the test mode, pay close attention to how the payment method is displayed on the site. If Yes is selected in the Test mode and the Activity checkbox is selected, currently used payment method is displayed on the site, however all the payments will be processed as test payments. Watch the warning message about test mode shown on the payment page.
Before you switch the plug-in back to the production mode, make sure that the Project ID and Secret salt boxes are populated with the values obtained from the Rocketpay technical support.
If you have any further questions regarding the plug-in operation, contact Rocketpay technical support at support@rocketpay.kz.