• Home
  • Merchants
  • Developers
  • Partners
  • Contact
  • Home
  • Merchants
  • Developers
  • Partners
  • Contact

PrestaShop Extension: Installation & Configuration

49 views 0 rrajvan

Charge Anywhere2 is a PrestaShop extension that enables merchants to accept payments from their customers through various payment gateways. In this article, we will discuss the features, benefits, and installation of Charge Anywhere2.

Jump to configuration

Features of Charge Anywhere2:

  • Integration with multiple payment methods: Charge Anywhere2 supports various payment methods like debit and credit cards (Visa, Mastercard, Amex, Discover, Union Pay, and JCB) and electronic fund transfer (ACH).
  • Customizable checkout page: Merchants can customize the checkout page to match the look and feel of their online store, or they can add custom fields to collect additional information from customers.
  • Recurring payments: Merchants can set up recurring payment plans for customers who want to make regular purchases.
  • Security: Charge Anywhere2 uses industry-standard encryption and authentication protocols to ensure that all payment data is transmitted securely.

Benefits of Charge Anywhere2:

  • Easy mode switching: The extension can be configured for both sandbox and production accounts, making it easy to switch between modes.
  • Gateway email option: The extension provides a gateway email option for both the vendor and customer, ensuring seamless communication.
  • No private SSL required: The extension does not require a private SSL, reducing the hassle and cost of acquiring one.
  • Transaction types: The extension supports both authorization and capture transaction types, providing flexibility to users.
  • Refund option: The extension provides a refund option, allowing users to customize the refund status.
  • Capture option: The extension provides a capture option, allowing users to customize the capture status.
  • Easy to install and configure: Charge Anywhere2 is very easy to install and configure, and it can be set up in just a few minutes.
  • Fast and reliable: Charge Anywhere2 allows merchants to accept payments from their customers in a fast, secure, and reliable manner.

Installation of Charge Anywhere2:

To install the Charge Anywhere2 PrestaShop extension, please follow these steps:

  • Download the Charge Anywhere2 extension module file and unzip (decompress) it on your computer.
Download
  • Once the extension has been downloaded, log in to your PrestaShop admin panel.
  • Navigate to Modules -> Module Manager, from the left sidebar. Click Upload a module (in the top right corner). Upload the zip file, which was recently downloaded in step 1.

Configure the Extension

  • On the Module Manager page, from the left sidebar. Click Configure next to Payments by Charge Anywhere2 to configure it with your desired settings.
  • Enter your Charge Anywhere2 account details, including your Merchant ID, Terminal ID, and Secret. You can also configure other settings such as API mode and Capture Status.

Note: If you don’t have the necessary API credentials, refer to how to retrieve Merchant ID, Terminal ID, and Secret for obtaining Charge Anywhere2 Plugin credentials.

  • Charge Anywhere2 Payment Gateway Settings
    • The table lists the attributes that can be configured for the Charge Anywhere2 Payment Gateway.
    • Each attribute comes with a description and available options.
    • The attributes can be customized based on business requirements and preferences.
    • The customization helps to provide a smooth and secure payment experience for customers.
AttributesDescription
Merchant IDUnique identification number provided by Charge Anywhere2.
Terminal IDUnique identification number provided by Charge Anywhere2.
SecretThe payment status of the initial transaction.
API ModeAllows you to select the API Mode. Choose between Sandbox/Developer API Mode and Live/Production API Mode.
Transaction ModeAllows you to select authorized only, or captured immediately. If you are not sure what to use, set it to Authorize.
Initial Payment StatusThe payment status of the authorize transaction.
Capture Payment StatusThe payment status of the captured transaction.
Refund Payment StatusPayment status of the refunded transaction.
Email To CustomerEnables or disables sending a default email to the customer from Charge Anywhere2.
Email To MerchantEnables or disables sending a default email to the merchant from Charge Anywhere2.
Accept CreditEnables or disables accepting credit cards as a payment method.
Accept ACHEnables or disables accepting ACH payments as a payment method.
  • If credit card payments are enabled you will see the following options:
AttributeDescription
Add Service FeeThis attribute allows you to enable or disable adding a service fee to the payment amount.
Service Fee LabelThis attribute allows you to set the label for the service fee.
SFThis attribute allows you to set the default service fee percentage.
Service Fee Percentage (%)This attribute allows you to set the service fee percentage for a specific transaction.
Include Tax Amount in Service Fee CalculationThis attribute allows you to include the tax amount in the service fee calculation.
Refund Service Fee on a ReturnThis attribute allows you to enable or disable refunding the service fee in case of a return.
Add Convenience FeeThis attribute allows you to enable or disable adding a convenience fee to the payment amount.
Convenience Fee LabelThis attribute allows you to set the label for the convenience fee.
Convenience Fee Amount ($)This attribute allows you to set the convenience fee amount for a specific transaction.
Refund Convenience Fee on a ReturnThis attribute allows you to enable or disable refunding the convenience fee in case of a return.
  • If ACH payments are enabled you will see the following options:
AttributeDescription
Add Service feeThis attribute allows you to add a service fee for ACH payments.
Service Fee LabelThis attribute requires you to enter the label for the Service Fee.
Service Fee Percentage (%)This attribute requires you to enter the percentage amount of the Service Fee for ACH payments.
Include Tax Amount in Service Fee CalculationThis attribute allows you to include the tax amount in the Service Fee calculation.
Refund Service Fee on a ReturnThis attribute allows you to enable or disable refunding the Service Fee when a return is made.
Add Convenience FeeThis attribute allows you to add a convenience fee for ACH payments.
Convenience Fee LabelThis attribute requires you to enter the label for the Convenience Fee.
Convenience Fee Amount ($)This attribute requires you to enter the fixed amount of the Convenience Fee for ACH payments.
Refund Convenience Fee on a ReturnThis attribute allows you to enable or disable refunding the Convenience Fee when a return is made.
  • Once the configuration is complete, it is important to test the module immediately to confirm that it functions as planned.

Additional Steps

Service Fee & Convenience Fee in Email attachment and Invoice

File 1: classes/pdf/HTMLTemplateInvoice.php

  1. Locate the method getContent() within the file HTMLTemplateInvoice.php.
  2. Insert the following code snippet above the line $footer = [ 'products_before_discounts_tax_excl' => $this->order_invoice->total_products, 'product_discounts_tax_excl' => $product_discounts_tax_excl,

// Charge anywhere fee to be shown in the email pdf file
$result = Db::getInstance()->executeS(‘SELECT * FROM ‘.DB_PREFIX.’chargeanywhere_sales_order WHERE cart_id = ‘.(int) $this->order->id_cart);

$chargeanywhere_fee = 0;
$fee_label = ”;
$chargeanywhere_conv_fee = 0;
$conv_label = ”;
$type_method = ”;

// Charge anywhere fee to be shown in the email pdf file
$result = Db::getInstance()->executeS('SELECT * FROM '._DB_PREFIX_.'chargeanywhere_sales_order WHERE cart_id = '.(int) $this->order->id_cart);

$chargeanywhere_fee = 0;
$fee_label = '';
$chargeanywhere_conv_fee = 0;
$conv_label = '';
$type_method = '';

if (count($result) > 0) {
    $result = $result[0];
    if ($result['fee'] != 0) {
        $fee_label = $result['fee_label'];
        $chargeanywhere_fee  = $result['fee'];
    }
    if ($result['conv_fee'] != 0) {
        $conv_label = $result['conv_label'];
        $chargeanywhere_conv_fee  = $result['conv_fee'];
    }
    $type_method = 'chargeanywhere';
    $this->order_invoice->total_paid_tax_incl += $chargeanywhere_fee + $chargeanywhere_conv_fee;
}
  1. Scroll down within the same getContent() method.
  2. Insert the following code snippet below the line $data = [ 'order' => $this->order, 'order_invoice' => $this->order_invoice, 'order_details' => $order_details,
'fee_label' => $fee_label,
'conv_label' => $conv_label,
'chargeanywhere_service_charges' => $chargeanywhere_fee,
'chargeanywhere_conv_charges' => $chargeanywhere_conv_fee,

File 2: themes/[theme-dir]/pdf/invoice.total-tab.tpl

  • Copy the file invoice.total-tab.tpl to the themes/[theme-dir]/pdf/ directory.
Download File
  • Ensure that you’ve made the necessary changes as mentioned above for the HTMLTemplateInvoice.php file before proceeding with this step.
  • Once you’ve completed the above instructions, the Prestashop code should include the additional fields and the invoice.total-tab.tpl template file should be copied to the appropriate location.

Please note that modifying Prestashop code directly may have implications for future updates and compatibility. It is recommended to back up your code and test thoroughly before deploying these changes in a production environment.

Cookies settings

If you’re facing a problem where users get logged out after making a payment in Prestashop, follow these steps to resolve it:

  1. Access Prestashop Backend: Start by logging into your Prestashop backend using your admin credentials.
  2. Navigate to Configuration: Once logged in, go to the “Configure” section. You can usually find this in the left-hand sidebar menu.
  3. Access Advanced Parameters: Within the “Configure” section, look for and click on “Advanced Parameters.”
  4. Access Administration Settings: Under “Advanced Parameters,” you’ll see various configuration options. Click on “Administration” to access settings related to your Prestashop administration.
  5. Configure Cookie SameSite: You’ll find a sub-menu labeled “General”. Look for the setting named “Cookie SameSite.” By default, this setting is often set to “Lax,” which can sometimes cause login issues after payments. Change it to “NONE.”
  6. Save Changes: After selecting “NONE” for the “Cookie SameSite” setting, make sure to save your changes.
  7. Test the Solution: To ensure the issue is resolved, have a user make a payment and verify that they are not logged out after completing the transaction.

That’s it! The Charge Anywhere2 extension is now installed and ready to use in your PrestaShop store.

Capture or Refund

To capture (force) or refund payment in PrestaShop, start by accessing the Main Menu, then go to Sell, select Orders, and click on View for the specific order you want to process. Here, you can set the order status to either “Refunded” or “Payment Accepted” to initiate the desired action.

Please keep in mind that the exact steps may slightly vary depending on your payment gateway configuration. It’s important to note that payments that are authenticated only cannot be refunded, and setting the status as “complete” for a payment that has already been captured won’t affect the ledger. Always ensure accuracy and transparency when managing payment transactions in PrestaShop.

Was this helpful?

Yes  No
Related Articles
  • Magento Extension: Installation & Configuration
  • CubeCart Extension: Installation & Configuration
  • WooCommerce Extension: Installation & Configuration
  • OpenCart Extension: Installation & Configuration
  • ZenCart Extension: Installation & Configuration

  ZenCart Extension: Installation & Configuration

WooCommerce Extension: Installation & Configuration  

This website and content contains confidential, trade secret information, which is proprietary to Charge Anywhere2, LLC, and its subsidiaries (collectively “Charge Anywhere2®”) and is provided solely for the recipient's use in connection with the recipient’s participation in one of the Charge Anywhere2’s Payment Gateway Programs. Charge Anywhere2 reserves the right to make changes to the specifications at any time and without notice. The information furnished by Charge Anywhere2 in this publication is believed to be accurate and reliable as of the date of its release; however, no responsibility is assumed by Charge Anywhere2 for its use, nor for infringements of patents or other rights of third parties resulting from its use, nor for the violation, misinterpretation, or misapplication of any laws, or any regulation of any credit card association including Visa USA, Visa International, or MasterCard International. No general license is granted under any patents, copyrights, or other intellectual property rights owned by Charge Anywhere2 and the recipient is only granted an end user license to use this information for the purpose of participating in one of Charge Anywhere2’s Payment Gateway Programs, pursuant to an agreement with Charge Anywhere2 or one of its authorized Program partners. All modifications or improvements to any of the information and specifications in this document shall belong exclusively to Charge Anywhere2, LLC. No unauthorized copying, disclosure, or use of this document is permitted without the express written consent of the Charge Anywhere2, LLC.

  • Privacy Policy
  • Terms of Use
  • Copyright 2024 Charge Anywhere2. All Rights Reserved

×