Magento 2 Al Rajhi Payment Gateway

Table of Content

  1. Extension Installation
  2. Configuration
  3. Al Rajhi Payment Method in Frontend
  4. Al Rajhi Payment Details in Backend

 

  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-al-rajhi-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_AlrahjiHosted --ignore-platform-reqs
    • By default, the extension is probably disabled.
    • Enable the extension and clear static view files:
      • php bin/magento module:enable Meetanshi_AlrahjiHosted --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
    To configure the extension, login to Magento 2, move to Sales à Payment Methods à Al Rajhi Bank Hosted Payment - Meetanshi where you can find various settings to enable the extension.
  • Enabled: Set “YES” to enable the Al Rajhi Payment Gateway extension.
  • Title: Set the title for the payment method to be displayed in the frontend.
  • Show Al Rajhi Logo: Set YES to show Al Rajhi logo along with the payment method in the frontend.
  • Encryption: Select encryption type.
  • Sandbox Mode: Select YES to enable sandbox mode.
  • Portal ID: Enter portal ID you received while registration with the Al Rajhi payment gateway.
  • Portal Password: Enter portal password you received while registration with the Al Rajhi payment gateway.
  • Resource Key: Enter the resource key you received while registration with the Al Rajhi payment gateway.
  • Gateway URL: Enter the gateway URL. It will get auto filled on extension installation.
  • UDF1, 2, 3, 4, 5: Enter user defined function if required.

Note: Login to your account at https://securepayments.alrajhibank.com.sa/mrchptl/merchant.htm using credentials, get the portal ID, portal password and resource key from your merchant portal.

  • Allow Auto Invoice: Select YES to automate invoice generation for the orders paid using the Al Rajhi payment method.
  • Payment from Applicable Countries: Select countries to allow using this payment method.
  • Additional Information: Enter the additional information to show on frontend along with the payment method.
  • Debug: Set YES to enable debug.
  • Sort Order: Enter Sort Order of the payment method display in the frontend.

 

  1. Al Rajhi Payment Method in Frontend
    Once the payment method is configured, whenever the customers add the products to cart and move to the checkout page, Al Rajhi payment method is shown. Just select the payment method, click “Proceed to Payment” to get redirected to the Al Rajhi hosted payment page, add the payment details and complete the payment.

  • Redirection to the Al Rajhi Hosted Payment Page
    After redirection to the Al Rajhi hosted payment page, enter card details and click on the “Pay” button.

 

  • Al Rajhi Payment Confirmation via OTP

Enter the OTP to confirm the payment and click “Submit” button to pay successfully for the order.

 

 

  1. Al Rajhi Payment Details in Backend

The admin can see the Al Rajhi payment details from Sales à Orders à Order View section in the backend.