Magento 1.9.X Community Edition (New) – Openpay Payment Plugin / Extension

Integration Guide

Objectives and Target Audience

This guide describes how to install and configure Openpay Payment Gateway Extension to Magento 1.9.X Community Edition. You should have an existing Magento installed.

Introduction

What is Magento Payment Extension?

Magento is an eCommerce platform, built on open source technology, which provides online merchants with not only a flexible shopping cart system, but also control over the look and feel, content and the functionality of their online store. Magento has been fully integrated with Openpay’s online payment solutions.

Installing and configuring the Hosted Payment Solution module of Openpay provide a simple, secure and convenient option to connect with Openpay’s online payment processing platform via Magento.

Signing up for Openpay merchant account

In order to start taking payments through Openpay, you need to sign up and get approval for an Openpay merchant account. Once your application is approved, you can configure Openpay Hosted Payment Solution module and start taking payments.

Openpay provides a test account and users for training and testing purpose.

Installing and Configuring Openpay Payment Extension

Prerequisites

Before installing the Openpay module, make sure that your web server meets the following criteria:

  • Magento should be pre-installed on your web server. The Openpay module is compatible with Magento version 1.9.x. The installation procedure described here has been tested on Magento version 1.9.x
  • Supported Web Servers: Apache / nginx
  • SSL: A valid security certificate is required to work over a secure channel (HTTPS) from the Magento Admin Panel or while submitting the form data from the store‐front. Self‐signed SSL certificates are not supported
  • MySQL database with sample data
  • At least 5.6 or the later version of PHP, MySQL and web browser Curl (version 7.20.0 ‐ 7.44.0)

For further details on PHP compatibility, MySQL, supported Web servers and other requirements, please refer to the Magento website: http://devdocs.magento.com/guides/m1x/system-requirements.html

Running Magento on a Windows server

Magento can be run on a Windows server.

Installation Steps

To install the Openpay payment extension, copy and paste all the plugin files within the Magento root folder

cd <magento installation directory>/app/code/community/Openpay/Payment/Model/paymentadapter/OpenpayApi and run the command composer install to download the packages

Log in to the Magento admin panel and clear your browser cache and Session:

Navigate to System > Cache Management > Flush Magento Cache

Admin Setup

Log in to your Magento admin account. If cron is not configured properly, you will get the error message (see the screenshot below). You need to setup the Magento cron properly. For cron set up instructions click here.

Navigate to Stores > Configuration > (on left panel) Sales > Payment Methods > Openpay Payment Method

  • Enabled: Yes

     

  • Title: Openpay – Buy now. Pay smarter.

     

  • Description: Leave it black

     

  • Mode: If the website is live then set it to ‘Production’. If the website is under construction or under development, then set it to ‘Sandbox’.

     

  • Region: Select Australia.

     

  • Openpay Username: Please enter Openpay Username provided by Openpay
    3-521

     

  • Openpay Password: Please enter Openpay Password provided by Openpay
    15EE89F2-5D36-4FB4-9ACB-824524F03D2F

     

  • Minimum Checkout Value: Click on ‘RunMin/Max’ button, the values will be pulled from the system.

     

  • Maximum Checkout Value: Click on ‘RunMin/Max’ button, the values will be pulled from the system.

  • Get Min/Max Values: Click ‘Run Min/Max!’ to get the min-max amount.
    (Order amount should be greater than the minimum and less than maximum to enable the Openpay payment method on the frontend of your site. This value is displayed on the Jam Token provided.)

     

  • Update Pending Order older than: Integer number used for the Update Order status cron job

     

  • Schedule for Limit Configuration: Frequency to run the Min/Max cron

     

  • Schedule for Pending Order Status: Frequency to run the Update order status cron

     

  • Disabled Categories: Add the Categories you don’t wish to use Openpay for.

     

  • Disabled Products: Add product SKUs with a comma separator if you don’t want Openpay available on certain products

     

  • Click ‘Save Config’ to save the settings.

Openpay Cron Jobs Setup:

Please make sure cron jobs are setup on your server to fetch the Min/Max Amounts configured for the nominated retailer and to update the status of the Pending Orders in Magento to either Active or Cancelled depending on the plan Status in Openpay.

Min/Max Cron Job The purpose of this call is to not display Openpay as a payment option if the order total is not within the range and this job will run every day at midnight.

Update Order Status Cron Job will run every hour to update the status of the pending orders in the store.

 

 

Please install the plugin Aoe_Scheduler, which will provide a good UI for cron jobs.

https://github.com/AOEpeople/Aoe_Scheduler/tree/master

After installing Cron Scheduler Module, you will automatically see the Openpay cron jobs.

 

How does Openpay work

If the customer chooses to checkout with items that are worth less than the total amount provided in the admin total, then Openpay will not show on the “Payment Method”.

If the amount is greater than the Minimum Order Value and Less than the Maximum Order Value which is set on admin configuration, it will allow the users to pay using Openpay Payment Method.

Click on the “Continue” tab, and the Order Review Option will be shown.

Click on the ‘Place Order’ and it will be redirected to the Openpay Payment Gateway. This will perform a HTTP POST request to Openpay.

Openpay Plan Creation

If the customer is already registered with Openpay, the following screen will be displayed:

If you do not have an Openpay account, you need to create one.

We do not send Email code on training mode please use 123456 for verification.

We do not send SMS on training mode please use 111111 for verification.

If the customer continues to login, then the following page will be displayed:

If one clicks on Submit Plan, and the plan is successful, the browser will be redirected to your site with “Your order has been placed” message.

Demo Site

Shows the placement of all the Openpay widgets and assets. You can test an Openpay plan creation on this site.

Testing

This section provides the credentials for test user and test merchant account on Openpay Training Environment to create and check your Openpay plan.

Test User

Username: testmagento@xx.yy
Password: Testing123

Test Merchant / Retailers Account

https://retailer.myopenpay.com.au/training
Username: test_user
Password: Test@123

Magento 1 Order Status

Processing
After successful payment order status will be ‘Processing’.

Complete
If the order is shipped or dispatch by the admin then orders status change to complete. If there is any partial refund it also changes the order to ‘Completed’.

Cancelled
If the order is cancelled by an admin user, or if ‘Automatically Cancel Openpay Pending Orders’ is set ‘Yes’ in Openpay payment settings, it will cancel the order based on the frequency of which it is configured. Openpay recommends that this frequency is set to ‘After one hour’.

Close
If the order is fully refunded by an admin user, then orders status change to ‘Close’.

Below is the detailed order status to share with your staff who look after orders, dispatch and refunds.

Refund

Partial Refund

Select an Openpay order you wish to partially refund. Order Status of that order should be either ‘Complete’ or ‘Processing’. (Example: Order ID#145000074)

Navigate from Magento Admin Panel to Sales > Orders > Choose the Openpay order you wish to refund and click on View.

Information > Invoice > Submit Invoice

Now, we have to create a Credit Memo for this order.

Click on Invoices > Open the Invoice > Click Credit Memo from the right upper corner.

New Credit Memo for the Order will be created.

To double check if this plan is active log on to your Openpay Retailer Portal in this instance the Openpay Plan ID is ‘3000000072571’. (This is just an example your Openpay plan id will be different).

Plan Status column on Openpay dashboard will show the plan Active as we haven’t refunded the plan yet.

Back to your Magento admin scroll down to Qty to Refund

Under Qty to Refund change the quantity to ‘0’ on all the products except the one you want to refund and click Update Qty’s.

If you wish you can refund the shipping amount by changing the value on Refund Shipping or adjust the refund manually by changing the value on Adjustment Refund and click on > Refund.

Refunded order will show as follows.

Back on Openpay Retailer’s Portal, after the partial refund, we can see the Openpay plan is updated, and under the ‘Purchase’ column amount has changed from $73.00 to $60.00. The plan will still show Active as the balance amount is yet to be paid off.

On Magento admin, the order status will show ‘Processing’ for a partial refund.

Please Note: The order can be partially refund n number of times until the full amount is refunded. You have to repeat the same process to make another partial refund.

Full Refund

Choose an Openpay order you wish to fully refund.

Order Status of that order should be either ‘Complete’ or ‘Processing’. (Example: Order ID# 145000075) Navigate from Magento Admin Panel to Sales > Orders > Choose the Openpay order you wish to full refund.

Click on Invoices > View 

Now, we have to create a Credit Memo for this order. Click Credit Memo from the right upper corner. 

To double check if this plan is active Openpay log on to your Openpay Retailer Portal in this instance the Openpay Plan ID is ‘3000000072573’. (This is just an example your Openpay plan id will be different).

Plan Status column on Openpay dashboard will show the plan Active as we haven’t refunded the plan yet.

Back to your Magento admin scroll down to Refund Totals and click on Refund button this will refund the full order amount.

Now the Status will be updated to ‘Closed’

You have now fully refunded the Magento Order.

You may confirm the refund on Openpay Retailers Dashboard the Openpay Plan Status will be changed to Refunded and the Purchase amount will change to $0.00

Uninstallation

  1. Disable the module from app/etc/modules/Openpay_Payment.xml

Set <active>true</active> to <active>false</active>

  1. If there is any dependent database table, please remove it.
  2. Don’t delete the column named `token` which was created for the plugin in the core_config_data
  3. In the core_resource table, please search for the ‘openpay_setup’ in the code field and remove that entry.
  4. Remove the magento/var/cache folder and refresh the frontend/admin page

 

Extension Update Notification

  • On the Openpay website, if there is an update available for the Openpay payment extension, then the client will get the notification of Update with the download link. They can download that extension from the Openpay website and install it.

FAQ

Q: For a successful purchase, what is the status in Magento?

A: After successful payment order status will be “Processing” by default.

Q: When does a processing order status change to complete?

A: If the order is shipped or dispatch by the admin then the order status change to complete. Also if there is any partial refund the order status change to complete.

Version Control Table

# Date Version Description
1 February 2021
1.0.0
Created payment plugin