1. Installation
- Download the module from the GitHub repository as a zip file
- Unzip archive, go to folder and zip the files into the mokka.zip directory
- Go to the admin page of your PrestaShop store http://store-address/adminxxx
- Go to Modules → Modules and Services
- Press the Add new module button and select the file from the module archive
- Press the Upload module button
Callback address for plugin: $SHOP_URL/modules/mokka/payment_callback.php should be available.
2. Configuration
- Go to the admin page of your PrestaShop store http://store-address/adminxxx
- Go to Modules → Modules and Services
- Search for Mokka and Install
- At first you need to add Merchants - test and production. If you don't have access to production yet please use same credentials as for test.
- Add configuration and complete fields.
Please remember to clear the store cache after changes.
Description of available merchant fields:
- Name → Name for merchant visible on configuration form
- API store ID → store ID assigned to the merchant in the Mokka production environment. You will receive it as part of the integration package
- API store secret key → the secret key for the Mokka production environment. You will receive it as part of the integration package
- API Base URL address → base URL to the Mokka production environment. You will receive it as part of the integration package
- Status → defines if the merchant is active to be hooked up in the configuration,
- Test mode → allows you to enable the test mode for Mokka payment plugin, if is enabled then environment is changed from production to test.
Description of available configuration fields:
API settings
- Enabled → determines whether the plugin is activated.
- Test mode → allows you to enable the test mode for Mokka payment plugin.
- Select merchant → defines which merchant for the production environment will be assigned to this configuration.
- Select merchant (test mode) → defines which merchant for the test environment will be assigned to this configuration.
Store settings
- Minimum Order Value → order value for which the payment method will be available.
- Generate invoice after Mokka accepted payment → if this option is enabled after a success payment invoice for order will be generated.
- Allowed Shipping Methods → selecting the delivery methods for which a payment method is available.
- Store → if there are more stores in the system, it determines in which of them payment is available.
Statuses settings
- Order status related to Mokka payment → this status will be set for order after Mokka confirms payment.
- Status when decisions in Mokka have been changed to accepted → this status will be set when Mokka have been changed to accepted.
- Status when decisions in Mokka have been changed to rejected → this status will be set when Mokka have been changed to rejected.
- Status for order cancellation → this element allows a select order status that triggers the Cancel method on the Mokka side.
- Status for order complete → this element allows a set order status that triggers the Finish method on the Mokka side.
- Status for order refunded → this element allows a set order status that triggers the Refund method on the Mokka side.
Checkout settings
- Logo → logo that is visible at the checkout.
- Title in checkout → this element allows entering a title for payment method which is displayed on the checkout page. The default value is “Revoplus - Rozbij płatność, nie odkładaj zakupów”. Change it to "Mokka - купи сега, плати по-късно"
- Color of title in the checkout → defines the font color for the content on the checkout page. The color code has to be '#FF5A1E'
Widget & Popup settings
- Widget visibility in product catalogue → this element allows the turn on/off widget on the product catalogue near to the product title. After clicking this button system should show Mokka registration iframe.
- Widget visibility in product view → this element allows the turn on/off widget on the product view near to the product title. After clicking this button system should show Mokka registration iframe.
- Widget logo img → this element allows uploading a new image for the widget logo. The default icon is available form the plugin package.
- Popup trigger image → this element allows uploading a new image for the popup trigger in widget. The default icon is available form the plugin package.
- Minimum loan months → this element will use to calculate the installment amount for showing in catalog product and product page. This value can be used in each title as a dynamic value - %minimum_loan_months%.
- Maximum loan months → this element will use to calculate the installment amount for showing in catalog product and product page. This value can be used in each title as a dynamic value - %maximum_loan_months%.
- Maximum Order Value → order value for which the payment method will be available.
- Widget content → HTML code for widget.
- Popup content → HTML code for popup.
Additional settings
- Enable Airbrake error logging → determines whether the plugin is send logs to Airbrake.
- Airbrake Project ID → Airbrake Project ID.
- Airbrake Project Key → Airbrake Project Key.
- Send metadata → permission to send the history of the customer assigned to the order
Description of the formatting of the titles in the registration buttons:
Dynamic values can be used in the text field, which can be displayed in the product catalog and on the product page in the title field.
- %minimum_loan_months% - dynamic value refers to minimum number of installments. Defined in the plug-in configuration.
- %maximum_loan_months% - dynamic value refers to maximum number of installments. Defined in the plug-in configuration.
- %installment_amount% - dynamic value calculated for each product based on the formula: round(final_product_price/%minimum_loan_months%).
- %minimum_order_value% - dynamic value relates to minimum order value. Defined in the plugin configuration.
3. How it works?
We create an account in the shop where the module is installed. We add products to the shopping cart. In the last step of the shopping process we choose Mokka as the payment method. After loading the iframe Mokka we complete the required data and wait for verification.
After successful verification, a response is sent to the "callback" address, which confirms the order.
Order finalization
Finalisation to Mokka will send after invoice generation and shipment complete.
Order changing
You can decrease loan amount via order editing. You cannot increase order amount.
Order cancellation
Cancellation to Mokka will send after following cases:
- Set status related to cancel options.
- Return full order amount before loan finalization.
Return order
If the order has Complete status you can use return function in store to return part or full amount.