Skip to content

bold-commerce/m1-bold-checkout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bold Checkout on Magento 1

Bold Checkout is a world-class checkout solution that allows you to maintain PCI compliance on your Magento 1 store without the need to replatform.

Adobe ended support for their Magento 1.x ecommerce platform on June 30, 2020. Since that date, Magento 1 merchants have been responsible for their own security and fraud compliance.

Bold Checkout provides a flexible solution to allow you to maintain your store security and continue using Magento 1. Bold Checkout on Magento 1 is implemented using a platform connector.

This document includes basic installation and configuration instructions, as well as how the platform connector works and debugging solutions.

There are two iterations of the Checkout integration with Magento 1. The significant difference is that beginning with v2.0.0, Checkout makes use of an architecture called the Remote State Authority (RSA). The RSA allows Checkout to receive much of its information about the state of an order from the platform, rather than performing its own calculations. This allows a much greater flexibility for Checkout to support special use cases that the platform provides. Since v1.0.0 does not utilize the RSA, the features Checkout can support are much more restricted. It is advisable to use the 2.0.x release, instead.

v2.0.x

Installation

To install Bold Checkout on Magento 1, follow the instructions in the Bold Help Center.

Configuration

Basic configuration for the Bold Checkout Integration is located in the Magento admin. Navigate to System > Configuration > Sales > Checkout > Bold Checkout Integration. Ensure that the current configuration scope (dropdown on the top left) is set to "Main Website".

M1 Bold Checkout Integration Configuration

The following list outlines the impacts of each configuration:

  1. Enable Bold Checkout - If this configuration is set to "Yes" and configuration is saved, then the following is true:
    1. Customer entities are automatically synchronized with Bold Checkout when saved on Magento.
    2. Destinations for customer, products, and orders are created or updated (in case the Magento base URL was changed).
    3. Webhooks for orders are registered.
    4. Zones for warehouse, shipping, and tax are created in Bold Checkout.
    5. Bold Checkout replaces Magento checkout.
    6. Orders created via Bold Checkout can be invoiced and refunded using Bold Checkout.
  2. API Token - An encrypted Bold Checkout API token used for all outgoing API calls for Bold Checkout. Generated in the Bold Account Center.

Advanced configuration for the Bold Checkout Integration is located in the Magento admin. Navigate to System > Configuration > Sales > Checkout > Bold Checkout Integration Advanced.

M1 Bold Checkout Advanced Integration Configuration

The following list outlines the impacts of each configuration:

  1. Bold Checkout Type - This configuration determines which Checkout customers will see.
    1. Standard - replace the native checkout with Bold Checkout's three-page checkout.
    2. Parallel - allow customers to choose between the native checkout or Bold Checkout.
    3. Self-Hosted - use the native checkout with Bold Checkout's payment options.
  2. Enabled For - This configuration limits the Bold Checkout process to certain audiences.
    1. All - All customers are redirected to Bold Checkout instead of native Magento checkout.
    2. Specific IPs - Only customers with listed IP addresses are redirected to Bold Checkout. All other customers continue to see Magento checkout. This setting is useful for testing Bold Checkout on the store.
    3. Specific Customers - Only customers with listed emails are redirected to Bold Checkout. All other customers continue to see Magento checkout. This setting is useful for testing Bold Checkout on the store.
    4. Percentage of Orders - The system redirects a specified percentage of customers to Bold Checkout.
  3. Exclude Customer Groups - This configuration will prevent any selected customer groups from accessing Bold Checkout.
  4. Excluded Customer Group List - This configuration only appears if Exclude Customer Groups is set to "Specific Customer Groups". Any number of the following categories can be selected for exclusion: General; Wholesale; VIP Member; and Private Sales Member.
  5. API URL - The Bold Checkout API URL. This is where all API calls to Bold Checkout are routed. Do not change without significant reason.
  6. Weight Unit - The weight unit used on your store. This is used during product synchronization to ensure Bold Checkout and Magento 1 measure weight in the same way.
  7. Weight Unit Conversion Rate To Grams - The conversion rate between your Weight Unit and grams. This is used during product synchronization to ensure Bold Checkout and Magento 1 measure weight in the same way.
  8. Checkout URL - The Bold Checkout URL. This is the URL of the store's checkout page. Do not change without significant reason.
  9. Platform Connector URL - The URL of the Platform Connector for Magento 1, which should have been installed in the Bold Account Center before performing this configuration. Do not change without significant reason.
  10. Platform Connector Integration Callback URL - Part of the Oauth flow between the Platform Connector and Magento. Do not change without significant reason.
  11. Platform Connector Integration Identity Link URL - Part of the Oauth flow between the Platform Connector and Magento. Do not change without significant reason.
  12. Enable Bold Checkout Requests Log - Enables logging for debugging purposes.

Compatible Magento 1 Extensions

Bold Checkout supports a variety of Magento 1 extensions. Some extensions are automatically compatible, and some require the installation of an extra extension to ensure they work correctly on your store.

For a full list of the compatible extensions, refer to the Bold Help Center.

How it works

The following steps outline what happens during the checkout process:

  1. Customer clicks the Checkout button in mini-cart or Proceed to Checkout button on the cart page.
  2. Magento verifies that the cart can use Bold Checkout.
    1. The cart cannot be used with Bold Checkout in the following scenarios:
      1. Bold/Checkout module is disabled.
      2. Cart is limited by configuration setting "Enabled For" described in the Configuration Section.
      3. The cart has an item with a decimal quantity.
    2. Magento sends an Initialize Order request with all items in the cart and discounts applied to the cart (including discount rules using discount codes).
    3. If the customer is authenticated, Magento sends an authorization request with customer data (email, first name, last name) and available addresses.
    4. Magento redirects the customer to the Bold Checkout page.
  3. Bold Checkout requests an inventory check from the RSA to verify that the requested product quantity is available.
  4. The customer provides all necessary address data on Bold Checkout page and clicks the Continue to shipping button.
  5. (Optional) If the customer applies a discount on the Bold Checkout page, Bold requests discount validation from the RSA.
  6. Bold Checkout makes an RSA request to retrieve the shipping methods and taxes applicable for the customer's shipping and billing addresses.
  7. The customer is redirected to the shipping methods page. The customer selects their preferred shipping method and clicks Continue to payment.
  8. The customer is redirected to the payment methods page. The customer selects their preferred payment method and clicks Complete order.
  9. Bold Checkout requests a final inventory check from the RSA.
  10. (Guest customer only) Bold Checkout sends a List Customers request filtered by email to the Magento platform connector.
    1. (Guest customer only) If no customer with that email is found, Bold sends a Create Customer request to the Magento platform connector.
    2. (Guest Customer only) Magento creates the customer and sends a Customer Saved notification to Bold.
  11. Bold Checkout sends a Create Order request to the Magento platform connector.
    1. Magento verifies that the request payload has all necessary order information.
    2. Magento finds the active customer cart for this checkout session and updates this cart with all necessary data, such as: shipping and billing address, payment method, and customer identifier.
    3. The order is placed using customer cart, the order email is sent to customer, and the cart is disabled.
    4. If Set up delayed payment capture is disabled, an invoice is created. Find this setting in the Bold Checkout admin on the Settings > General Settings > Checkout Process page.
    5. The order's total is verified against the Bold payment transaction amount. If the totals are different, a comment with the amount difference information is added to the order.
    6. The created order data is sent back to Bold Checkout.
  12. If necessary, Bold Checkout sends an Update Order request to the Magento platform connector.
  13. If the order was successfully created on the Magento side, Bold sends the order/created webhook to Magento. Refer to the webhooks section for details.

Debugging

You can find logs about all incoming and outgoing requests from/to Bold Checkout in system.log.

If you cannot see some logs, such as product sync requests, the website may not be in developer mode. Navigate to the Magento admin System > Configuration > Developer > Log Setting and set Enabled to Yes.

Some useful queries to verify data within the logs:

  1. To get product data from Bold:
    curl --request GET 'https://api.boldcommerce.com/products/v2/shops/{shop_id}/products/pid/{magento_product_id}?deep=true' \
    --header 'Authorization: Bearer {api_token}'
  2. To get customer data from Bold:
    curl --request GET 'https://api.boldcommerce.com/customers/v2/shops/{shop_id}/customers/pid/{magento_customer_id}' \
    --header 'Authorization: Bearer {api_token}'
  3. To get override data from Bold:
    curl --request GET 'https://api.boldcommerce.com/checkout/shop/{shopId}/overrides' \
    --header 'Authorization: Bearer {api_token}'
  4. To get destination data from Bold:
    curl --request GET 'https://api.boldcommerce.com/integrations/v1/shops/{shopId}/platform_connector_destinations' \
    --header 'Authorization: Bearer {api_token}'
    

v1.0.0

Installation

To install Bold Checkout on Magento 1, follow the instructions in the Bold Help Center.

Note: This version does not utilize the Platform Connector for Magento 1, so the step to install it can be skipped. Additionally, when copying the module code from the Checkout module to the Magento /etc folder, there is only one file to copy: Bold_Checkout.xml. The other module shown is for the Platform Connector and is not needed here.

Configuration

Basic configuration for the Bold Checkout Integration is located in the Magento admin. Navigate to System > Configuration > Sales > Checkout > Bold Checkout Integration.

M1 Bold Checkout Integration Configuration

The following list outlines the impacts of each configuration:

  1. Enable Bold Checkout - If this configuration is set to "Yes" and configuration is saved, then the following is true:
    1. Category, product, and customer entities are automatically synchronized with Bold Checkout when saved on Magento.
    2. Destinations for customer, products, and orders are created or updated (in case the Magento base URL was changed).
    3. Overrides for shipping, taxes, and discounts are created or updated (in case the store base URL was changed).
    4. Webhooks for orders are registered.
    5. Zones for warehouse, shipping, and tax are created in Bold Checkout.
    6. Bold Checkout replaces Magento checkout.
    7. Orders created via Bold Checkout can be invoiced and refunded using Bold Checkout.
  2. API Token - An encrypted Bold Checkout API token used for all outgoing API calls for Bold Checkout. Generated in the Bold Account Center.
  3. Secret Key - An encrypted Bold Checkout secret key used for all incoming API calls authorization from Bold Checkout. Generated in the Bold Account Center.

Advanced configuration for the Bold Checkout Integration is located in the Magento admin. Navigate to System > Configuration > Sales > Checkout > Bold Checkout Integration Advanced.

M1 Bold Checkout Advanced Integration Configuration

The following list outlines the impacts of each configuration:

  1. Enabled For - This configuration limits the Bold Checkout process to certain audiences.
    1. All - All customers are redirected to Bold Checkout instead of native Magento checkout.
    2. Specific IPs - Only customers with listed IP addresses are redirected to Bold Checkout. All other customers continue to see Magento checkout. This setting is useful for testing Bold Checkout on the store.
    3. Specific Customers - Only customers with listed emails are redirected to Bold Checkout. All other customers continue to see Magento checkout. This setting is useful for testing Bold Checkout on the store.
    4. Percentage of Orders - The system redirects a specified percentage of customers to Bold Checkout.
  2. Enable Real-Time Synchronization - Bold strongly recommends setting this value to Yes to ensure accurate synchronization.
    1. Yes - Categories, customers and products are synchronized with Bold Checkout during the saving process.
    2. No - The developer must create and run a cron job in order to synchronize categories, customers, and products with Bold Checkout. A one-minute or longer sync lag can occur.
  3. API URL - The Bold Checkout API URL. This is where all API calls to Bold Checkout are routed. Do not change without significant reason.
  4. Checkout URL - The Bold Checkout URL. This is the URL of the store's checkout page. Do not change without significant reason.
  5. Weight Unit - The weight unit used on your store. This is used during product synchronization to ensure Bold Checkout and Magento 1 measure weight in the same way.
  6. Weight Unit Conversion Rate To Grams - The conversion rate between your Weight Unit and grams. This is used during product synchronization to ensure Bold Checkout and Magento 1 measure weight in the same way.

How it works

The following steps outline what happens during the checkout process:

  1. Customer clicks the Checkout button in mini-cart or Proceed to Checkout button on the cart page.
  2. Magento verifies that the cart can use Bold Checkout.
    1. The cart cannot be used with Bold Checkout in the following scenarios:
      1. Bold/Checkout module is disabled.
      2. Cart is limited by configuration setting "Enabled For" described in the Configuration Section.
      3. There is a bundle product in the cart.
      4. The cart has an item with a decimal quantity.
      5. Magento is configured to calculate taxes based on billing address.
      6. Magento is configured to calculate prices including taxes.
      7. Magento is configured to calculate taxes before applying discounts.
    2. Magento sends an Initialize Order request with all items in the cart and discounts applied to the cart (including discount rules using discount codes).
      Note: During checkout initialization, sometimes the following error appears: "There was an error during checkout. Please contact us or try again later. This occurs because some of the products in the cart are not synchronized with Bold Checkout. In this case, re-save the product(s) in the Magento admin. If "Enable Real-Time Synchronization" is set to "No", also ensure the cron job is running.
    3. If the customer is authenticated, Magento sends an authorization request with customer data (email, first name, last name) and available addresses.
    4. Magento redirects the customer to the Bold Checkout page.
  3. Bold Checkout triggers an inventory override to verify that the requested product quantity is available.
  4. The customer provides all necessary address data on Bold Checkout page and clicks the Continue to shipping button.
  5. (Optional) If the customer applies a discount on the Bold Checkout page, Bold triggers a discount override call.
  6. Bold Checkout triggers two override requests to Magento:
    1. Shipping override - to calculate all available shipping methods and prices for the given cart.
    2. Tax override - to calculate all available taxes applied for the given cart.
  7. The customer is redirected to the shipping methods page. The customer selects their preferred shipping method and clicks Continue to payment.
  8. The customer is redirected to the payment methods page. The customer selects their preferred payment method and clicks Complete order.
  9. Bold Checkout triggers an inventory override.
  10. (Guest customer only) Bold Checkout sends a List Customers request filtered by email to the Magento platform connector.
    1. (Guest customer only) If no customer with that email is found, Bold sends a Create Customer request to the Magento platform connector.
    2. (Guest Customer only) Magento creates the customer and sends a Customer Saved notification to Bold.
  11. Bold Checkout sends a Create Order request to the Magento platform connector.
    1. Magento verifies that the request payload has all necessary order information.
    2. Magento finds the active customer cart for this checkout session and updates this cart with all necessary data, such as: shipping and billing address, payment method, and customer identifier.
    3. The order is placed using customer cart, the order email is sent to customer, and the cart is disabled.
    4. If Set up delayed payment capture is disabled, an invoice is created. Find this setting in the Bold Checkout admin on the Settings > General Settings > Checkout Process page.
    5. The order's total is verified against the Bold payment transaction amount. If the totals are different, a comment with the amount difference information is added to the order.
    6. The created order data is sent back to Bold Checkout.
  12. If necessary, Bold Checkout sends an Update Order request to the Magento platform connector.
  13. If the order was successfully created on the Magento side, Bold sends the order/created webhook to Magento. Refer to the webhooks section for details.

Overrides

Bold uses overrides to replace native Bold Checkout behavior with Magento behavior. For example, the shipping override replaces Bold's available shipping methods with the Magento shipping methods.

Find more information about overrides on the API Overrides page.

Webhooks

Webhooks are registered at the moment the merchant saves the Bold Checkout Integration configuration.

Currently, the module only uses one webhook: the order/created event. This webhook is used for the customer newsletter subscription, and it should be removed if the customer newsletter subscription data is sent with the order creation call.

Zones

Zones for warehouse, shipping, and tax are created or updated in Bold Checkout at the moment the merchant saves the Bold Checkout Integration configuration.

These zones are created using data from the Magento 1 admin but are only meant to streamline setup. The information in these zones can be sample data and does not have to reflect an actual tax zone.

Compatible Magento 1 Extensions

Bold Checkout supports a variety of Magento 1 extensions. Some extensions are automatically compatible, and some require the installation of an extra extension to ensure they work correctly on your store.

For a full list of the compatible extensions, refer to the Bold Help Center.

Debugging

You can find logs about all incoming and outgoing requests from/to Bold Checkout in system.log.

If you cannot see some logs, such as product sync requests, the website may not be in developer mode. Navigate to the Magento admin System > Configuration > Developer > Log Setting and set Enabled to Yes.

Some useful queries to verify data within the logs:

  1. To get product data from Bold:
    curl --request GET 'https://api.boldcommerce.com/products/v2/shops/{shop_id}/products/pid/{magento_product_id}?deep=true' \
    --header 'Authorization: Bearer {api_token}'
  2. To get customer data from Bold:
    curl --request GET 'https://api.boldcommerce.com/customers/v2/shops/{shop_id}/customers/pid/{magento_customer_id}' \
    --header 'Authorization: Bearer {api_token}'
  3. To get override data from Bold:
    curl --request GET 'https://api.boldcommerce.com/checkout/shop/{shopId}/overrides' \
    --header 'Authorization: Bearer {api_token}'
  4. To get destination data from Bold:
    curl --request GET 'https://api.boldcommerce.com/integrations/v1/shops/{shopId}/platform_connector_destinations' \
    --header 'Authorization: Bearer {api_token}'