Stripe for OpenCart. Configuration. Part 1

Product page
OpenCart Marketplace
Demonstration site admin area
Demonstration site front-end

In this article, I’ll tell you how to configure the Stripe payment gateway for OpenCart and describe the main functions this extension has.
First of all, you need to upload the extension to your server. The uploading process varies depending on the version of OpenCart you are using and whether you are using OCMOD or VQMOD modification system so it’s not a topic of this article. After the extension has been uploaded you need to install it and go to extension’s admin area. To do it open the list of payment methods existing on your system, click ‘Install’ button and then ‘Edit’ button in the ‘Stripe Payment Gateway’ row (figure 1)

List of avalable payment methods in OpenCart store
Figure 1.

In the top part of extension’s admin area are present all the important information concern extension’s configuration (figure 2)
1. The ‘Test mode’ label is shown when the extension is in the test mode.
2. The notification under number 2 is showed when the extension is disabled.
3. The notification under number 3 is showed when the extension hasn’t been registered as webhook endpoint in Stripe Dashboard.

Stripe for OpenCart admin area
Figure 2.

To start working with the extension you need to have an account at Stripe.com (in order to be able to make live payments the account needs to be approved, unapproved account supports only test payments). To link the Stripe account to the extension you need to supply API keys, which you can find in the Dashboard of your Stripe account.
Next, I’ll show how to configure the extension and how each configuration affects extension’s work

The ‘API Keys’ Tab

Contents of the ‘API keys’ tab are shown in figure 3. Configurations are summarized in table 1.

Use this tab to connect the extension to your Stripe account (dashboard). You can connect the extension to any number of Stripe accounts. The only restriction is that all accounts need to have different currencies. This is a convenient way to avoid the currency conversion fee that may be applied when customer’s payment card currency doesn’t match your stripe account currency. Depending on an order currency the extension will place the order in specific Stripe account. An order which currency doesn’t match to existing accounts will be placed in the account, labeled as ‘Default’ (figure 3, pos. 2)

Stripe for OpenCart API tab
Figure 3.

In order to configure this tab you need to fill in next fields:
Table 1. ‘API keys’ tab configurations

Input name Description
Account name A unique name of your choice
Account currency The currency of associated Stripe account
Live secret key, Live publishable key, Test secret key, Test publishable key You need to provide at least one pair of secret/publishable keys depending on the extension’s mode (test or live). In order to obtain API keys, you need to follow the link (figure 3, pos. 1) to your Stripe account (figure 4)

Stripe Dashboard
Figure 4.

By default, you have only one Stripe account. To add more click on the ‘Add Stripe account button’ (figure 3, pos. 3). To delete account click on the ‘Delete account’ button (figure 3, pos. 4)

The ‘General’ Tab

Contents of the ‘General’ tab are shown in figure 5. Configurations are summarized in table 2.

Stripe for OpenCart General tab
Figure 5.

Table 2. ‘General’ tab contents

Input name Description
Payment method Defines payment mode. There are 3 options: authorize, capture and authorize if fraud. Authorize – a payment card won’t be charged right away, the sum will be just “reserved”. You can capture that sum (fully or partially) through the Stripe Dashboard or the OpenCart’s order management interface (figure 6). Authorized and not captured sum will be “release” in 7 days. Capture – a payment card will be charged right away. You can make a refund (full or partial) through Stripe Dashboard or OpenCart’s order management interface. Authorize if fraud – before charging a payment card the extension will run all the enabled antifraud extensions. If fraud will be detected – the sum will be authorized, otherwise – captured.
Payment currency Defines the currency of the charge when front-end currency doesn’t match the currency of your Stripe account (setting “Account currency” from “API” tab). You can select between “Store” and “Order” options. “Store” means that currency of your Stripe account will be used, “Order” – front-end currency. This option gives you more control over currency exchange rate: with “Store” setting selected the exchange rate, provided by OpenCard will be applied, “Order” setting – Stripe will use its own exchange rate. If you have several Stripe accounts linked to the extension and there is account with currency that matches front-end currency this setting won’t affect the order currency selection and currency of that matched account will be used instead
Charge description Description of a charge, to be shown in Stripe Dashboard. You can use “shortcodes” (code which will be replaced by some specific value at runtime, e.g {customer_full_name} will be replaced by the full name of the specific customer). To get the list of all the supported shortcodes click on the blue button with question mark near the input field
Customer description Description of a customer, to be shown in Stripe Dashboard. This fields supports shortcodes
Statement descriptor An arbitrary string to be displayed on your customer’s credit card statement
Min total amount Minimum total amount of an order for the extension to be displayed as payment option on checkout
Max total amount Maximum total amount of an order for the extension to be displayed as payment option on checkout
Geo Zones This option enables to use the extension as a payment option only for specific Geo-Zones
Payment systems This option enables you to limit the list of vendors whose payment cards can be processed using the extension. When customer tries to use payment card of forbidden vendor he/she will be notified and payment process will be canceled
Stores This option enables to use the extension as a payment option only for specific stores
Customer groups This option enables to use the extension as a payment option only if customer belongs to a specific group
Sort Order Defines the position under which the extension appears in the list of available payment methods on checkout
Receipt Email Defines whether to send charge receipt at customer’s email address. Receipts will not be sent for test mode charges. In live mode, if set to “Yes” will override Stripe Dashboard’s setting, if set to “No” Stripe Dashboard’s setting will be applied
Notify customer When you change payment status directly from Stripe Dashboard this option defines whether a customer will be notified of the change of the order status (the order status change email). In order for order status to be changed when a charge change from the Stripe Dashboard, you need to set up webhook endpoint. How to configure webhook endpoint read further in this article
Override This setting compliments the previous setting and allows to override order status blocked by an antifraud extension

OpenCart order management system
Figure 6.

The second part of the article read here

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
*
*