Magento 2 Westpac PayWay Payment Gateway

Table of Content

  1. Extension Installation Guide
  2. Configuration – PayWay Hosted
  3. PayWay Hosted Method in Frontend
  4. PayWay Hosted Payment Details in Sales Order View Backend
  5. Configuration – PayWay Direct
  6. PayWay Direct Payment Method in Frontend
  7. PayWay Direct Payment Details in Order View Backend
  8. PayWay Direct Payment Method for Backend Order
  9. New Backend Order Placement using PayWay Direct Stored Cards
  10. Refund Online for PayWay Direct Orders
  11. Configuration – PayWay Trusted Frame
  12. PayWay Trusted Frame Payment Method in Frontend
  13. PayWay Trusted Frame Payment Details in Order View Backend
  14. New Backend Order Placement using Trusted Frame Stored Cards
  15. Refund Online for PayWay Trusted Frame Orders

 

  1. Extension Installation
  • For Magento Marketplace Customers
    • Find the Composer name and version of the extension in the extension’s composer.json file.
    • Login to your SSH and run:
      • composer require meetanshi/magento-2-westpac-payway-payment-gateway --ignore-platform-reqs
    • Enter your authentication keys. Your public key is your username; your private key is your password.
    • Wait for Composer to finish updating your project dependencies and make sure there aren’t any errors.
    • To verify that the extension installed properly, run the command:
      • php bin/magento module:status Meetanshi_Payway --ignore-platform-reqs
    • By default, the extension is probably disabled.
    • Enable the extension and clear static view files:
      • php bin/magento module:enable Meetanshi_Payway --clear-static-content
      • php bin/magento setup:upgrade
      • For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
      • For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
      • php bin/magento cache:flush
  • For Meetanshi Customers
    • Extract the zip folder and upload our extension to the root of your Magento 2 directory via FTP.
    • Login to your SSH and run below commands step by step:
      • php bin/magento setup:upgrade
      • For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
      • For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
      • php bin/magento cache:flush
  1. Configuration – PayWay Hosted
    To configure the extension, login to Magento 2, move to Stores à Configuration à Sales à Payment Methods à PayWay Payment – Meetanshi à PayWay Hosted Payment – Meetanshi where you can find various settings to enable the extension.
  • Enabled: Enable PayWay hosted payment method from here.
  • Title: Enter title for the PayWay hosted payment method to show in the frontend.
  • Show PayWay Logo: Select YES to show PayWay logo on the checkout page in frontend.
  • Sandbox Mode: Set YES to enable sandbox mode for the payment gateway.
  • Biller Code: Enter the biller code received while registration with PayWay.
  • Username: Enter the username received while registration with PayWay.
  • Password: Enter the password received while registration with PayWay.
  • Encryption Key: Enter the encryption key received while registration with PayWay.
    • Login to https://www.payway.com.au/ with your credentials. Click on the Gear icon in the top right to move to the settings. Under “PayWay Modules”, click on “PayWay Net”.

 

  •  Now, click “Setup Hosted Payment Page”.

  • A new page with “Hosted Payment Page Setup” will now be displayed. Select page type, here, “Bill Payments/Shopping Cart - secure shopping cart handoff” option and click next.

  • On biller code page, you will find your biller code, copy the same and paste it in the relevant field in Magento 2 extension configuration. Set up the page by uploading custom style sheet (if any), company logo and background. Click “Next”.

  • Enter the “Browser Return URL Pre Payment” and “Browser Return URL” as https://yoursite.com/payway/payment/success and click “Next”.

  • Copy encryption key, user name, password and paste the same in the respective Magento 2 Extension configuration fields. Click “Next”.

Note: Don’t forget to add IP addresses from which you will be placing test orders using the sandbox mode.

  • You can configure various customer reference number and digit algorithm related settings from here. Click “Next”.

  • Setup minimum and maximum limits for payments. Also, you can enable PayPal payment method to allow users pay through PayPal on the hosted payment page. Click “Next”.

  • Enter surcharge amount in percentage to charge customers for using a particular card type.

  • Allow Auto Invoice: Set YES to auto generate invoice for the orders placed through PayWay payment method.
  • Order Status: Set status for the new orders placed through PayWay payment method.
  • Payment from Applicable Countries: Select all or selected countries to allow payments using PayWay.
  • Payment from Selected Countries: If you have set selected countries from the above option, select the countries to allow payments using PayWay.
  • Additional Information: Enter additional information to show on the checkout page in the frontend.
  • Debug: Select YES to enable debug.
  • Sort Order: Enter sort order of the PayWay payment method.

  1. PayWay Hosted Payment Method in Frontend
    Once the extension is configured, the PayWay hosted payment method can be seen enabled in the frontend. Simply add products to cart and go to the checkout, select the payment method, click “Continue to Payment” button to get redirected to the PayWay hosted payment page to complete the payment and place order successfully.

  • On PayWay hosted payment page, add card details. Here, you can see order and merchant details. Click Next.

  • Pass the security check and click “Confirm Payment” after confirming the order and payment details.

 

  • PayWay Hosted Payment Details in Customer’s My Account Section
    Immediately after the order is placed, the PayWay hosted payment details can be seen in My Orders > Order View under the customer’s “My Account” section.

  1. PayWay Hosted Payment Details in Sales Order View Backend

Apart from the customer’s My Account section, the admin can also see PayWay hosted payment details from the Sales à Orders à Order View section in the backend.

  1. Configuration – PayWay Direct Method
    Login to Magento 2, move to Stores à Configuration à Sales à Payment Methods à PayWay Payment – Meetanshi à PayWay Direct Payment - Meetanshi, where you can find various settings to configure the direct method.
  • Enabled: Enable Westpac PayWay direct method from here.
  • Vault Enabled: Set YES to enable vault to allow customers save cards for future transactions.

Basic Settings:

  • Title: Enter title for the PayWay direct payment method to show in the frontend.
  • Show PayWay Logo: Select YES to show PayWay logo on the checkout page in frontend.
  • Payment Action: Select one of the payment actions for the payment capture.
    • Authorize: Authorizes and validates card for the order amount. The admin has to manually capture the amount (by generating invoice using “Capture Online” option) within the authorization hold period which is ranging from 1 day to 30 days (based on business and card types) for Westpac PayWay Payment.
    • Authorize and Capture: Authorizes and captures the order amount immediately.
  • Sandbox Mode: Set YES to enable sandbox mode for the payment gateway.
  • Merchant ID: Enter the merchant ID provided by Westpac PayWay payment while registration.
  • Publishable API Key: Enter the publishable key provided by Westpac PayWay payment while registration.
  • Secret API Key: Enter the secret API key provided by Westpac PayWay payment while registration.
    • Login to https://www.payway.com.au/ with your credentials. Click on the Gear icon in the top right to move to the settings. Under the “Banking” section, click “Merchants”.

 

  • Copy the Merchant ID and paste it into the relevant field in Magento 2 extension configuration. Click “Back” button.

  • Now, click on “REST API Keys” under “Access to PayWay” section.

  • Click “Add” button to add new rest API keys. If already created, copy publishable and secret keys from here and paste them in the relevant Magento 2 extension configuration fields.

Advanced Settings:

  • Vault Title: Enter the vault title to show in the email to customers.
  • New Order Status: Set status for the new orders placed through PayWay direct method.
  • Debug: Select YES to enable debug.
  • Instructions: Enter instructions to show on the checkout page in the frontend.
  • Minimum Order Total: Enter minimum order total to allow use of the payment method.
  • Maximum Order Total: Enter maximum order total to allow use of the payment method.
  • Sort Order: Enter sort order of the payment method.

Country Specific Settings:

  • Payment from Applicable Countries: Select all or selected countries to allow payments using PayWay direct payment.
  • Payment from Selected Countries: If you have set selected countries from the above option, select the countries to allow payments using PayWay direct payment.

  1. PayWay Direct Payment Method in Frontend
    Once the payment method is configured, it can be seen enabled in the frontend. Simply add products to cart and go to the check out, you can see the Westpac PayWay direct payment method enabled. Select it, enter the card details and click “Place Order” to finish payment and place the order successfully. The customers can tick the box here to save the card for future transactions.

 

  • PayWay Direct Payment Details in My Account Section
    Immediately after the order is placed, the PayWay direct payment details can be seen in order view tab under the customer’s My Account section.

 

  • PayWay Direct Payment Stored Cards
    If the vault is enabled and the customers have ticked the box from the checkout page to save the cards for the future transactions, they can see stored cards in their My Account section under “Stored Payment Methods” tab.

  • New Order Placement using Stored Cards
    If the vault is enabled and the customer has ticked the box from the checkout page to save the card for the future transactions, he can use the stored card to pay for the new order in future.

  1. PayWay Direct Payment Details in Order View Backend
    Apart from the customer’s My Account section, the admin can see PayWay direct payment details from the Sales à Orders à Order View section in the backend.

  1. PayWay Direct Payment Method for Backend Order
    Just as the frontend, Westpac PayWay direct payment method also works with the backend orders. Admin needs to create a new order, select the customer, add products, enter the address details and select Westpac PayWay direct payment method, add card details and click “Submit Order” to place order from the backend using the Westpac PayWay direct payment method.

  1. New Backend Order Placement using PayWay Direct Stored Cards
    If the customer has stored cards for the future transactions, the admin can use the stored cards while creating a new order from the backend. The admin needs to create a new order, select the customer, add products, enter the address details and select PayWay payment stored card, and click “Submit Order” to place order from the backend using the PayWay Payment stored cards.

  1. Refund Online for PayWay Direct Orders
    If the customer initiates refund, admin can refund online for PayWay direct orders from invoice as shown in the below image.

 

  1. Configuration – PayWay Trusted Frame
    To configure the trusted frame payment method, login to Magento 2, move to Stores à Configuration à Sales à Payment Methods à PayWay Payment – Meetanshi à PayWay iframe Payment – Meetanshi, where you can find various settings to configure the extension.
  • Enabled: Enable PayWay trusted frame payment method from here.
  • Vault Enabled: Set YES to enable vault to allow customers save cards for future transactions.

Basic Settings:

  • Title: Enter the title for the PayWay trusted frame payment method to show in the frontend.
  • Show PayWay Logo: Select YES to show PayWay logo on the checkout page in frontend.
  • Sandbox Mode: Set YES to enable sandbox mode for the payment gateway.
  • Payment Action: Select one of the payment actions for the payment capture.
    • Authorize: Authorizes and validates card for the order amount. The admin has to manually capture the amount (by generating invoice using “Capture Online” option) within the authorization hold period which is ranging from 1 day to 30 days (based on business and card types) for Westpac PayWay Payment.
    • Authorize and Capture: Authorizes and captures the order amount immediately.
  • Merchant ID: Enter the merchant ID provided by Westpac PayWay payment while registration.
  • Publishable API Key: Enter the publishable key provided by Westpac PayWay payment while registration.
  • Secret API Key: Enter the secret API key provided by Westpac PayWay payment while registration.
    • Login to https://www.payway.com.au/ with your credentials. Click on the Gear icon in the top right to move to the settings.  Under the “Banking” section, click “Merchants”.

 

 

  • Copy the Merchant ID and paste it into the relevant field in Magento 2 extension configuration. Click “Back” button.

  • Now, click on “REST API Keys” under “Access to PayWay” section.

  • Click “Add” button to add new rest API keys. If already created, copy publishable and secret keys from here and paste them in the relevant Magento 2 extension configuration fields.

Advanced Settings:

  • Vault Title: Enter the vault title to show in the email to customers.
  • New Order Status: Set status for the new orders placed through PayWay trusted frame method.
  • Debug: Select YES to enable debug.
  • Instructions: Enter additional instructions to show on the checkout page in the frontend.
  • Minimum Order Total: Enter the minimum order total to allow the use of the payment method.
  • Maximum Order Total: Enter the maximum order total to allow the use of the payment method.
  • Sort Order: Enter sort order of the payment method.

Country Specific Settings:

  • Payment from Applicable Countries: Select all or selected countries to allow payments using PayWay trusted frame.
  • Payment from Selected Countries: If you have set selected countries from the above option, select the countries to allow payments using PayWay trusted frame.

 

  1. PayWay Trusted Frame Payment Method in Frontend
    Once the payment method is configured, it can be seen enabled in the frontend. Simply add products to cart and go to the checkout, you can see the PayWay trusted frame payment method enabled. Select it, enter the card details and click “Place Order” to finish payment and place the order successfully. The customers can tick the box here to save the card for future transactions.

 

  • PayWay Trusted Frame Payment Details in My Account Section
    Immediately after the order is placed, the PayWay trusted frame payment details can be seen in order view tab under the customer’s My Account section.

 

  • PayWay Payment Stored Cards
    If the vault is enabled and the customers have ticked the box from the checkout page to save the cards for the future transactions, they can see PayWay stored cards in their My Account section under “Stored Payment Methods” tab.

 

  • New Order Placement using Stored Cards
    If the vault is enabled and the customer has ticked the box from the checkout page to save the card for the future transactions, he can use the stored card to pay for the new order.

  1. PayWay Trusted Frame Payment Details in Order View Backend
    Apart from the customer’s My Account section, the admin can also see PayWay trusted frame payment details from the Sales à Orders à Order View section in the backend.

 

  1. New Backend Order Placement using Trusted Frame Stored Cards
    If the customer has stored cards for the future transactions, the admin can use the stored cards while creating a new order from the backend. The admin needs to create a new order, select the customer, add products, enter the address details, select PayWay stored card, and click “Submit Order” to place order from the backend using the PayWay payment stored cards.

  1.  Refund Online for PayWay Trusted Frame Orders
    If the customer initiates refund, admin can refund online for trusted frame orders from invoice as shown in the below image.