# By CMS module
# Use case
If the web site of the merchant is built with one of the popular Content Management System (CMS) listed below, the integration should be completed with the corresponding Pledg by Sofinco module:
CMS | Integration mode | Available languages |
---|---|---|
Magento v2 | Redirection to a page containing the plugin | EN, FR |
Prestashop v1.6 | Plugin | DE, EN, ES, FR, IT, NL |
Prestashop from v1.7.4 to v8.2.0 | Redirection to a page containing the plugin | DE, EN, ES, FR, IT, NL |
Sylius | Redirection to Pledg | DE, EN, FR |
Woocommerce | Redirection to Pledg | DE, EN, ES, FR, IT, NL |
Salesforce Commerce Cloud | Redirection to Pledg | EN, FR |
Shopify | Redirection to Pledg | EN, FR, DE |
# Magento v2
# Step 1 - Account creation
As a prerequisite, for every merchant / payment solution, an account ID (merchant_uid
) has to be setup by Pledg integration team.
# Step 2 - Installation
The installation, the upgrade and the uninstallation of the module are done via PHP Composer.
Prior to execute the commands, you need to connect using SSH to the server and go to the Magento root directory.
In the following example, the Magento root directory is /var/www/magento
# Installation
composer require pledgbysofinco/module-pledgbysofinco-payment-gateway
php bin/magento module:enable Pledg_PledgPaymentGateway --clear-static-content
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy <languages>
php bin/magento cache:clean
# Upgrade
composer update pledgbysofinco/module-pledgbysofinco-payment-gateway
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy <languages>
php bin/magento cache:clean
# Uninstallation
php bin/magento module:disable Pledg_PledgPaymentGateway
composer remove pledg/module-pledg-payment-gateway
# Step 3 - Configure your Magento shop 🔧
In the administration interface of Magento, go to Stores > Configuration > Sales > Payment methods > Other payment methods
.
Set the General Configuration
Fields description:
- Staging: enable or disable depending on the environment
- SIRET custom field name: if you have B2B facilities, Pledg will need customers SIRET information. You have to fill here the name of your custom SIRET field.
- Company custom field name: if you have B2B facilities, Pledg will need customers company name information. If you are using a custom field for the company, you have to fill it name here.
- Enable widget in product page: Enable or disable widget on product page
Set up your different payment solutions:
Fields description:
- Enabled: indicates if the payment mode has to appear on the payment screen or not.
- Is B2B: Check yes if this is a B2B facility. A customer with SIRET number and company name filled in his personnal informations will only be displayed B2B facilities.
- Title/description: indicates the Title/description of the payment mode displayed to final customer.
- Logo: allows to upload a logo displayed on the payment screen.
- Merchant UID mapping (mandatory): for every country where the payment mode is enabled, you have to fill-in in the corresponding merchant_uid . Pledg provides 1 merchant_uid per country.
- Secret key: Secret key used to sign exchanges between merchant's site and Pledg. It is provided by Pledg.
- Minimum order amount to activate payment: Allows to define a minimum total order to display or not to final customer the payment mode.
- Maximum order amount to activate payment: Allows to define a maximum total order to display or not to final customer the payment mode.
- Sort order: integer to define the order to display the current payment mode.
- Allowed groups: if you specify one or more groups here, the facility will be shown only to customers belonging to these groups.
Save configuration (Top right button).
# Configuration of the widget
- If the 'Enable widget on product page' option is checked, a small widget will be displayed on the product page to inform buyers about our solution.
- When the information button is clicked, a popup will appear informing the customer about how to proceed and display a payment schedule.
# Troubleshooting
If the configuration does not apply, empty Magento cache:
- System > Cache management/"Flush Magento Cache".
- Wait for the notification: "The Magento cache storage has been flushed.".
- If this does not help, connect to the server using ssh, go in the ROOT folder of Magento and run the following command:
php bin/magento cache:clean
# Step 4 - Test the checkout 🔦
Carry out a complete test in your environment:
- Fill your basket with items
- Proceed to payment
- Check in the SALES > ORDERS interface of the administration that your test order is present in the list.
# Prestashop v1.6
# Step 1 - Account creation
As a prerequisite, for every merchant / payment solution, an account ID (merchant_uid
) has to be setup by Pledg integration team.
# Step 1bis - Uninstallation (optional)
Before redoing the installation, a complete uninstallation of the module is necessary.
- Uninstalling the module
- Go to the module manager by clicking on "Modules and services" in the menu.
- Look for the Pledg module.
- Click on the green "Disable" button.
- Click on the submenu next to the "Enable" button and click on "Delete".
- Confirm the deletion; a notification will inform you that the "Module(s) uninstalled successfully".
⚠️ Before reinstalling the Pledg module, the Prestashop's cache must be emptied. To do this, go to "Advanced Settings"/"Performance" and click on "Empty Cache".
# Step 2 - Installation
Add the module in Prestashop
- Go to "Modules and services" and click on "Add a new module".
- Select the "pledg" archive in zip format and click on "Load module"; a notification will indicate that "The module has been downloaded".
- Install the Pledg module
- Look for the Pledg module in the list of modules.
- Click on the "install" button.
- Click on the "Continue Installation" button; a notification will indicate "Module(s) installed successfully".
Once the installation is complete, a new item "Pledg - Payments" should appear in the Prestashop menus.
# Step 3 - Configuration
🔧 On your Prestashop Back Office, you can add the various Pledg payment methods.
- Go to Pledg - Payments:
- add a payment method:
- fill the information:
- Fill in the fields.
- Click on the "Save" button; a notification will say "Creation successful".
- Repeat the add operation for all your Pledg payment methods.
Description of the fields:
- Title (required): the title of the payment method; this title will appear to the user (example: "Pay in 3x").
- Activate payment: yes if you want to activate this payment method.
- Production mode: yes if you want to put this payment method into production.
- Business type: wether the payment method is B2C or B2B. A customer with SIRET number and company name filled in his personnal informations will only be displayed B2B payment methods.
- Merchant ID (required): This is the mapping between the merchant Ids and the country in which the payment method is activated.
- Secret (required): your secret key used to certify payments (communicated by Pledg).
- Minimum: minimum amount in the customer's cart, that allows them to use this payment method.
- Maximum: maximum amount till which the customer can use this payment (if you don't which to set a threshold, type 0).
- Icon: lets you upload an icon that the customers will see in front of this payment method.
- Description: the description of your payment.
- Position: order of priority to display your Pledg payment methods.
- Disabled shop: choose not to display this payment method on a specific shop
- Disabled groups: choose not to display this payment method for the customers belonging to the groups selected (the ones that you can customize in Customers>Groups)
# Step 4 - Test
Carry out a complete test in your environment:
- Fill your basket with items
- Proceed to payment
- Check in the "Orders" interface of the administration that your test order is present in the list.
# Prestashop from v1.7.4 to v8.2.0
# Step 1 - Account creation
As a prerequisite, for every merchant / payment solution, an account ID (merchant_uid
) has to be setup by Pledg integration team.
# Step 2 - Installation
Download PledgBySofinco module for Prestashop 1.7.4 and 1.7.5 (opens new window)
Download PledgBySofinco module for Prestashop from 1.7.6 to 8.2.0 (opens new window)
Add the module in Prestashop
- Go to module manager via the menu "Modules" and click on "Load module".
- Select the "PledgBySofinco" archive in zip format; a notification will tell you that "The module has been successfully uploaded downloaded".
The module will be automatically activated and will appear in the "MORE" section of the menu.
# Step 3 - Configuration
🔧 In your Prestashop admin, you can add your PledgBySofinco payment methods.
In the left menu, go to MORE > PledgBySofinco - Payments [1]. You get to the screen as shown on the below image, listing all the PledgBySofinco payment methods already set up. Click on "Add Payment" [2]
🔖 Fill in the information then click on Save:
Description of the fields:
- Title (required): the title of the means of payment; this title will appear to the user (example: "Pay in 3x").
- Activate payment: enable / disable this payment method.
- Production mode: yes if you want to put this payment method into production, no if you want to keep it in test mode for now.
- Business type: wether the payment method is B2C or B2B. A customer with SIRET number and company name filled in his personnal informations will only be displayed B2B payment methods.
- Marchant ID (mandatory): This is the mapping between the merchant Ids and the country in which the payment method is activated.
- Secret: Secret key for authentication (i.e. securing) the payments (communicated by Pledg).
- Minimum: minimum amount in the customer's cart, that allows them to use this payment method.
- Maximum: maximum amount till which the customer can use this payment (if you don't which to set a threshold, type 0).
- Icon: lets you upload an icon that the customers will see in front of this payment method.
- Description: the description of your payment.
- Position: order of priority of the selected payment method.
# Configuring the widget
A widget is available on single product page and cart page. It displays the payment methods configured :
- Single product page
- Cart page
When clicking the information button, a popup will inform the customer about how to proceed, and display a payment schedule
You can enable / disable the widgets in the module configuration, by clicking on "configure" once the module is installed, or by going in Modules > Module Manager and finding the PledgBySofinco one.
For the product page widget, you can select the place where the widget will be inserted in the page:
- the product price hook (selected by default)
- the product additional info hook
- the product "after thumbs" hook
Here are the different possible locations for the product widget:
# Step 4 - Test
Carry out a complete test in your environment:
- Fill your basket with items
- Proceed to payment
- Check in the "Orders" interface of the administration that your test order is present in the list.
# Upgrading
To upgrade the module, you need to first uninstall it, and then go back to Step 2 - Installation
- Go to the module manager by clicking on "Modules" in the menu.
- Look for the PledgBySofinco module.
- In the left sub-menu click on "Disable" and then on "Uninstall".
- Confirm the uninstallation: a notification will inform you "Module(s) uninstalled successfully".
⚠️ Before reinstalling the PledgBySofinco module, the Prestashop's cache must be emptied. To do this, go to "Advanced Settings"/"Performance" and click on "Empty Cache".
# Sylius
# Supported versions
As of now, Sylius versions from 1.6 to 1.14 are supported.
# Step 1 - Account creation
As a prerequisite, for every merchant / payment solution, an account ID (merchant_uid
) has to be setup by Pledg integration team.
# Step 2 - Installation/Upgrade/Uninstallation
The installation, the upgrade and the uninstallation of the module are done via PHP Composer. Prior to execute the commands, you need to connect using SSH to the server.
# Installation:
Please Follow the instructions below in the installation guide (opens new window):
- Install the package
- Import routes
- Add assets
- Import the state machine configuration
- Clear cache
# Switch Sandbox/Production environment:
By default, plugin uses sandbox mode. You can configure it by specify the mode in your configuration files. For example if you only want to disable the sandbox mode for the production environment you just have to create a config/packages/prod/pledg_sylius_payment_plugin.yaml file with :
pledg_sylius_payment:
sandbox: false
# Upgrade:
composer update "pledg/sylius-payment-plugin"
cp -R vendor/pledg/sylius-payment-plugin/tests/Application/templates/bundles/SyliusAdminBundle/* templates/bundles/SyliusAdminBundle/
cp -R vendor/pledg/sylius-payment-plugin/tests/Application/templates/bundles/SyliusShopBundle/* templates/bundles/SyliusShopBundle/
php bin/console cache:clear
# Uninstallation:
composer remove pledg/sylius-payment-plugin
# Step 3 - Configure your Sylius shop
🔧 In the administration interface of Sylius :
- Go to
Configuration > Payment methods
.
- Create a new payment method of type
Pledg
. - Set up you payment solution
- Fill in the fields.
- Click on the "+Create" button; a notification will say "Creation successful".
- Repeat the add operation for all your Pledg payment methods.
Description of the fields:
- Code (required): it's an alias of the means of payment; this code will appear only on administration interface (example: "Pledg3x").
- Position: order of priority of the selected payment method.
- Enabled?: enable / disable this payment method.
- Channels: Enabled/disabled on the channel "Fashion web store".
- Type: Type of Payment method.
- Merchant ID (required): This is the mapping between the merchant Ids and the country in which the payment method is activated.
- Secret: Secret key for authentication (i.e. securing) the payments (communicated by Pledg).
- Minimum Price: minimum amount in the customer's cart, that allows them to use this payment method.
- Maximum Price: maximum amount till which the customer can use this payment (if you don't which to set a threshold, type 0).
- Restricted countries: the countries in which the payment method is activated.
- Name: The title of payment method that will appear to the client.
- Description: the description of your payment method.
# Woocommerce
# Step 1 - Account creation
As a prerequisite, for every merchant / payment solution, an account ID (merchant_uid
) has to be setup by Pledg integration team.
# Step 2 - Uninstallation (optional)
Before redoing the installation, a complete uninstallation of the module is necessary.
Save your settings: before uninstalling the module, we recommend that you save your settings.
- Go to WooCommerce > Settings and click on the "Payments" tab and copy your identifiers (
merchant_uid
) for each payment method.
- Go to WooCommerce > Settings and click on the "Payments" tab and copy your identifiers (
Uninstall the module
- Go to the module manager by clicking on Plugins > Installed Plugins in the menu.
- Look for the PledgBySofinco module.
- Click on "Desactivate" in blue.
- Click on "Delete" in red.
- Confirm the uninstallation; a notification will inform you that the "WooCommerce PledgBySofinco was successfully deleted".
# Step 3 - Installation
Download PledgBySofinco's WooCommerce module
Take the archive as is, then:
- Add the module in WordPress
- Go to module manager via the menu "Plugins > Add new" and click on "Load module".
- Click on "Upload Plugin".
- Select the archive you just retrieved in zip format and click on the "Install Now" button.
- Then click on the "Activate Plugin" button; a notification will say "Plugin activated".
# Step 4 - Configuration of the payment methods
🔧 On your Woocommerce Back Office, you can add the different PledgBySofinco payment methods.
To do so, go to Woocommerce > Setting > Payments where you will find a list of the PledgBySofinco payment methods that you can set up.
For each of your account identifiers (merchant_uid
), configure a PledgBySofinco method. The ones you have configured and activated will appear in the payment methods available to the customer.
🔖 Click on the "Manage" button and complete the information, then click one on the "Save changes" button; a notification will inform you that "Your settings have been saved".
Description of the fields:
- Enable/Disable: yes if you want to activate this payment method.
- Development/Production mode: yes if you want to put this payment method into production.
- Merchant ID [Required]: for every country where the payment mode is enabled, you have to fill-in in the corresponding merchant_uid . Pledg provides 1 merchant_uid per country.
- Secret Key: Secret key for authenticating (i.e. securing) of the payments (communicated by Pledg).
- Title: Language for which you wish to set the means of payment title.
- Title ([Language you've selected just above]): the title of the means of payment for the selected language; this title will appear to the user (example: "Pay in 3x"). [Required]
- Description: Language for which you wish to set the the means of payment's description.
- Description ([Language you've selected just above]): the description of your payment method in the selected language.
- Minimum amount: minimum amount from which the payment method will be offered the customer.
- Maximum amount: maximum amount till which the payment method will be offered the customer (set "0" if you don't wish any threshold).
⚠️ The maximum number of PledgBySofinco payment methods is 6.
# Step 5 - Configuration of the widget
You can also configure the display mode of our widget. Go to Settings > PledgBySofinco.
- If "Enable product widget" is checked, a little widget on the product page will inform buyers about our solution.
- If "Enable cart widget" is checked, a little widget on the cart page will inform buyers about our solution.
- The last option will enable the automatic selection of a PledgBySofinco payment method on the checkout page if the buyer has already click on the widget, and thought seems interested in the solution
# Step 6 - CSS (optional)
If the size of the icons in front of your PledgBySofinco payment methods is too big, add a css block of code following this process:
- Click on "Appearance" in the left menu, then "Customise":
- On the newly appeared page, a new menu is displayed on the left, click on "additional CSS":
Copy / Paste this block of code [1]:
ul.payment_methods li img { vertical-align: middle; margin: -2px 0 0 .5em; padding: 0; position: relative; box-shadow: none; max-width: 23px; }
Then click on "Publish" [2]:
# Step 7 - Test
Carry out a complete test in your environment:
- Fill your basket with items
- Proceed to payment
- Check in the "WooCommerce > Orders" interface of the administration that your test order is present in the list.
# For information
If an error occurs during the PledgBySofinco payment process of a customer, you will find informations about it (such as the error status) on the order page, in the notes section :
# Salesforce Commerce Cloud
# Step 1 - Account creation
As a prerequisite, for every merchant / payment solution, an account ID (merchant_uid
) has to be setup by Pledg integration team.
# Step 2 - Installation (admin interface, called "business manager" in SFCC)
# Adding the cartridge in UX Studio
To upload the cartridges into the SFCC server, you first need to add the cartridges in SFCC UX Studio. In order to do this, follow these instructions :
In UX Studio, select in the menu File > Import. In the import dialog, select General > Existing Projects in the workspace and click on 'Next'. Ensure 'Select archive file' is selected and select the compressed cartridge file by clicking on the 'Browse' button.
You'll find here the folder : https://github.com/pledgcorporate/ecard-sfcc/archive/refs/heads/develop.zip
Click on 'Finish' button to import the cartridges. Studio will now ask you if you want to link the cartridge to your active DigitalServer connection. Click on yes or manually link the cartridge to your server by checking the project under project references in the server connection properties.
# Importation of the Pledg settings
In the archive folder after unzipping, you’ll see a “link_pledg” folder.
Inside it, go to metadata/pledg-meta-import/sites where you’ll find a RefArchFR, that you have to rename with the identifier of your site (if you have several sites, you should duplicate the folder as many times as you have different sites on which you want to use Pledg, and rename each folder with the identifier of each site).
Then go 2 levels upper back to the folder “metadata”, and zip the folder “pledg-meta-import” to get the archive plug-meta-import.zip
In your SFCC admin panel (business manager), go to Administration > Site Development > Site Import & Export, as follows :
Under “Upload Archive” you can see 2 radio buttons (Local and Remote). “Local” has to be selected. Upload there, through the dialog box (“Choose file”), the archive file “Pledg-meta-import.zip” that you have just compressed. After clicking on “Upload”, you’ll see a new line in the array : “instance/pledg-meta-import.zip”. Select the radio button in front of it and click on “Import”. A confirmation message asking you whether you’re sure you want to import the archive appears, click “OK”.
It should look like this in the end :
After the successful metadata import, the following attributes should have been created: Navigate to the Merchant Tools > Site Preferences > Custom Preferences. Custom site preference groups with the ID ‘Pledg Settings’ will be available. That brings you to the next step of the module deployment.
# Configuring the settings to take the module into account
Here, we are going to set up the general parameters of the SFCC back office.
First, go to the "Sites" section after selecting the "Administration" tab. It should be something like that :
Then you need to go to "Manage Sites" sub-section:
The list of your storefront sites is now displayed and you have to select the one on which you want to make Pledg available:
Once you're on the desired site's page, it should look like that :
Click on the "Settings" tab [1], then select "Sandbox/Development" [2] and add the string "int_pledg_sfra" [4] in both fields "Cartridge" and "Effective Path Cartridge" [3]. Then do the same with "Production" selected in [2].
# Activating the Pledg module
You have to set the custom preferences related to the Pledg module. For that, go to "Merchant tools" (1), then "Site preferences" (2) :
On the next screenshot you can see a field "Custom preferences", click on it to get the list of custom preferences groups :
Select "Pledg" group :
You should now see the following screen :
Explanation of the fields :
- Enable Pledg : Disables the whole module and its functionalities.
- Pledg Environment : Can be "Staging" (test purpose) or "Production".
- PledgScript URL : The URL where the code of the Pledg plugin is hosted. Like in this example, for now the URL is "htpps://s3-eu-west-1.amazonaws.com".
- Payment Operator : Should always be PLEDG.
In general, you will only have to decide one parameter : whether being in "staging" or "production" mode.
# Setting up each Pledg payment method
These settings are managed in the "Merchant Account" tab [1]. So you need to select there "Ordering" section [2] as in the following screenshot :
Then "Payment Method" section :
You now got to a list, containing all the payment methods that your site already offers your customers:
By clicking the "New" button, you can add a new payment method (if the payment method already exists, double click on it if you want to modify it).
You then get to the following screen :
Description of the fields :
Image : You can here drag and drop a picture to be displayed in front of the payment method you're offering the clients.
Payment Processor : Has to be Pledg.
Countries : Leave to value "All".
Customer Groups : Select the customer groups to whom you want to offer this payment method.
Min/Max Payment Ranges : Select for what amount contained in the cart of the customer, you want to offer them this payment method.
Merchant Id : Unique identifier given by Pledg, corresponding to the given payment method in Pledg database.
Secret : Code aimed at signing (in JWT) the communication between your server and Pledg server.
Repeat the same operation for all the payment method you subscribed with Pledg, and you'll get all your newly configured Pledg payment methods in the list, as in the following screenshot :
# Shopify
# App link
# Step 1 - Add Application
- Login with your Shopify account and Click on "Add App".
# Step 2 - Install Application
- Connect your shopify store and click on "install app" .
# Step 3 - Payment Settings
- Once the application is installed, you will be redirected to the payment settings. Complete the settings with the informations communicated by PledgBySofinco.
Description of the fields :
- Company uid/Merchant uid: The key to identify the payment facility
- Secret key : Secret key for authenticating and securing the payments
- Dashboard Username : E-mail to connect to PledgBySofinco's Dashboard
- Dashboard Password : password to connect to PledgBySofinco's Dashboard
NB : In case the merchant is on Transfer mode, it is very important to use the same dashboard Username/Password on Staging and Production environments. It is needed for authentification on refund process.
- Save your settings.
# Step 4 - Activate App
- You will be redirected to the payment settings of your sotre. If you are working on a test environment, enable test mode
- Click on "Activate PledgBySofinco"
# Step 5 - Checkout settings
Go to Checkout and accounts and make sure you select
- "Email" as Customer contact method to check out.
- Require "first and last name" from customer information
# Step 6 - Testing
- Now you can go to the storefront, fill your Cart with an item and pass to the checkout
Select Payment with "Pay later or in installment", Click on "review order" then "pay now "
Select your payment method and "Submit"
As a required information you will first be asked to fill your phone number. Click then on "Submit"
Fill your credit card informations and submit your payment
The payment is completed
Check order in the Backoffice.
# Step 7 - Refund on Shopify
- If merchant is in Transfer mode (bank wire transfer), refund of PledgBySofinco's order can be issued directly from Shopify Backoffice.
- If merchant is in Back mode (vcards usage), refund of PledgBySofinco's order has to be issued directly from Merchant's PSP Backoffice.