[ENG] InPost Pay - Magento
Foreword
This manual presents the process of installation and configuration of the plugin enabling the addition of InPost Pay in the Magento store.
Plugin: (23.08.2023 r.)
Requirements
For proper operation, it is required to install Magento in a version not lower than 2.4.x and PHP in a version not lower than 7.4.
Installation
Follow the steps below to install the plugin:
Download the packed Magento plugin from the inpost website and unpack it
Using FTP, upload the unpacked plugin in the/app/code directory of your store.
Execute `bin/magento setup` command
Na tej stronie
- 1 Foreword
- 1.1 Requirements
- 1.2 Installation
- 1.3 Test Config
- 1.4 Production Config
- 1.5 Full Config
- 1.6 Consents
- 1.7 Net transport price
- 1.8 GUI Settings
- 1.9 Display in a custom location
Test Config
In this chapter, we describe the shortened configuration process required to perform functional tests of InPost Pay integration. For initial setup, go to the module list and click “Configure” next to the Inpost Pay module. After clicking it, a form will appear allowing you to configure the plugin. Fill in the fields according to the list below:
Select the environment and display options.
a. Set the environment to "Sandbox" - this way money will not be debited from the account during testing.
b. Set show widget to “Testers” - this way the widget will only be visible to people who are supposed to see it. Setting a different option will display the widget that works or not to all visitors to your store.
In order to display the widget in your web browser, enter the address of your store adding ?showIzi=true. Example: https://mystore.com?showIzi=trueFill in the API access data you received from InPost in fields
a. Client
b. Client Secret..Enable payment option.
Add the consents that will be required in your store. A detailed description of each option can be found in the Full config section -https://dokumentacja-inpost.atlassian.net/wiki/spaces/PL/pages/173932552/InPost+Pay+-+Magento#Pe%C5%82na-Konfiguracja
Select the order status that will be given to orders paid via InPost Pay
Connect the courier shipment with the system shipment. After selecting the shipping method from the drop-down list, the same availability and pricing rules for the selected method will apply to shipping by Courier in the InPost application.
Connect the shipment via the Parcel Locker with the system shipment. After selecting the shipping method from the drop-down list, the same availability and pricing rules for the selected method will apply to parcel locker shipping in the InPost application.
Specify where the widget should be available on your website. You can display it in the product list, product card and in the cart. For each display location, you can specify which side the InPost Pay button will align to. For each place, you can select separately whether the background on the page is light or dark, which will ensure the correct display of texts. For each location, you can select the display option separately. The button can be amaranth or yellow.
Production Config
After the correct test configuration and making sure that the integration works in the Sandbox, InPost Pay should be made available to all users.
For setup, go to the module list and click “Configure” next to the Inpost Pay module. After clicking it, a form will appear allowing you to configure the plugin. Change the configuration according to the list below:
Select the environment and display options.
a. Set the environment to "Production" - this way the money will be debited from the account during testing.
b. Set show widget to “All”
Full Config
The section contains a full list of available InPost Pay configuration options.
API Settings
This section sets the system access data, the types of payment methods supported and the information exchanged between InPost Pay and the store.
Access data to the sandbox environment can be obtained by writing an e-mail to integracjapay@inpost.pl
You will receive production data after signing the InPost Pay service agreement
Description of available options:
Environment:
Do czego służy: | How to set: |
---|---|
Determines whether the store sends data to the UAT, Sandbox or production environment. | For integration testing, set the Sandbox environment. If the tests were successful and you want to enable the option of buying through InPost Pay, set the Production environment.. |
Show widget:
What is it used for: | How to set: |
---|---|
During testing, we do not want the InPost Pay widget to be displayed to all customers. Regardless of what environment is set, you can temporarily hide the widget and display it to selected people only. In order to display the widget in tester-only mode, go to the main page of the store adding the following string at the end of url ?showIzi=true For example https://outofthebox.pl?showIzi=true | To configure the integration, select Testers. In order to show the widget to everyone after completing the configuration tests, set All. |
Client ID:
What is it used for: | How to set: |
---|---|
API Access Data. | According to data received from InPost. |
Client Secret:
What is it used for: | How to set: |
---|---|
API Access Data. | According to data received from InPost. |
POS ID:
What is it used for: | How to set: |
---|---|
To determine the POS position. | According to data received from InPost. |
Enable payments according to the contract concluded with Aion:
What is it used for: | How to set: |
---|---|
Determines whether your customers will be able to make payments through payment gateways that are included in your agreement with Aion such as Blik, Apple Pay, card payment | Check Yes if these methods are to be made available. |
Enable payment on delivery according to the contract concluded with InPost:
What is it used for: | How to set: |
---|---|
Determines whether your customers will be able to make cash on delivery payments according to the contract with InPost. | Check Yes if this method is to be made available. |
Order status for order paid by InPost Pay:
What is it used for: | How to set: |
---|---|
Specifies the status of orders to be paid by InPost Pay. | Select the status of the paid orders from the list. |
Maximum number of suggested products:
What is it used for: | How to set: |
---|---|
Specifies the maximum number of products that will be suggested to your customer in the Inpost app for the products already in the cart. Suggested products are taken from the standard Magento mechanism. | Enter the maximum number of products. |
Consents
The section is used to set the consents displayed to customers in the InPost application when shopping with InPost Pay.
Description of available options:
Consent address:
What is it used for: | How to set: |
---|---|
Specifies the page to which your customer will be redirected to read the consent.
| Select one of your store pages from the drop-down list. |
Description displayed in the app:
What is it used for: | How to set: |
---|---|
Specifies the description displayed in the app. | Enter the description to be displayed. |
Required?:
What is it used for: | How to set: |
---|---|
Determines whether the consent is required. | Enter the consent requirement from the list. |
Tip: If you want to create one checkbox in the app to approve more than one document, create a page to link to all the applicable consents.
Net transport price
Section responsible for mapping forms of transport and determining the availability and prices of additional transport options.
Description of available options: The settings of this section are analogous for all shipping types and for all options.
Below is a generic description of where the type of shipment was used as the type of shipment and the option for the shipment option:
Courier/Parcel Locker:
What is it used for: | How to set: |
---|---|
Determines which of the shipping methods available in the store determines the prices and rules for shipping types courier/parcel locker. The list includes standard shipping methods available in the System. | Select the shipment available in your store from the drop-down list. |
Options for PWW and COD:
Please Remember!
The following options must be set in accordance with your InPost agreement.
Courier/Parcel Locker [option] net:
What is it used for: | How to set: |
---|---|
Specifies the price of the additional option. | Enter the net amount. |
Courier/Parcel Locker [option] available from (date):
What is it used for: | How to set: |
---|---|
Determines from which day of the week this option is available. | Select the day of the week from which the option will be available to your customers |
Courier/Parcel Locker [option] available from (hour):
What is it used for: | How to set: |
---|---|
Determines from what time this option will be available. | Select the time from which the option will be available to your customers. |
Courier/Parcel Locker [option] available to (day):
What is it used for: | How to set: |
---|---|
Determines to which day of the week this option is available. | Select the day of the week to which the option will be available to your customers. |
Courier/Parcel Locker [option] available to (hour):
What is it used for: | How to set: |
---|---|
Determines to what time this option will be available. | Select the time to which the option will be available to your customers. |
GUI Settings
Here you can set whether and where to display the InPost Pay widget. The section has been divided into subsections corresponding to the different subpages of your store.
Please remember! We set the GUI according to the Merchant Guide you received in the email from InPost.
Description of available options:
Display:
What is it used for: | How to set: |
---|---|
Determines whether the widget should be displayed in the respective subpage. | Check if the widget is to be displayed. |
Alignment:
What is it used for: | How to set: |
---|---|
Specifies the orientation of the widget in the space available to it. If your template only allocates a narrow space to the widget, this setting will not affect its appearance. | Select alignment from the drop-down list. |
Background:
What is it used for: | How to set: |
---|---|
Determines whether the widget is on a light or dark background. This setting affects the font colour. | Select alignment from the drop-down list. |
Variant:
What is it used for: | Jak ustawić: |
---|---|
The widget is available in 2 colour variants. Select the one that best suits Your store. | Select alignment from the drop-down list. |
Margin:
What is it used for: | How to set: |
---|---|
Display in a custom location. | If the widget is displayed incorrectly in the cart page, adjust its display by adding a margin. |
Display in a custom location
To display the widget in a custom place, use the code below in your template:
\izi\InPostIzi::render(
$productId = null,
$name = '',
$maskedPhoneNumber = '',
$inpost_basket_id = '',
$echo = true,
$addBasketId = false,
$variationId = '',
$count = 0,
$dark = false,
$yellow = false,
$cart = false,
$float = 'left',
$bindingPlace = 'BASKET_POPUP'
);
Parameter description:
Parametr | Opis | Wartości |
---|---|---|
productId | ID of the product to be added to the cart before pairing | int |
name | The customer name you receive from the API | string |
maskedPhoneNumber | The masked phone number you receive from the API | string |
inpost_basket_id | Cart ID you receive from API | string |
echo | Display? | bool |
addBasketId | Display cart id in HTML? | bool |
variationId | Variation ID | int |
count | Number of products in cart | int |
dark | Display in dark mode? | bool |
yellow | Display yellow variant? Amaranth will be displayed by default | bool |
cart | Are we on the shopping cart page? | bool |
float | CSS float | left | right | center |
binding Place | Pairing point | PRODUCT_CARD | |