Integrating with Magento 2.x

Apruve has developed an Apruve payments extension for Magento. It allows your customers to choose Apruve as the payment method during the checkout process. Once the order is submitted we will take care of the invoicing and payments.

You can find the extension on the Magento Marketplace website (2.x).

Make it yours, or help us make it better.

The extension is 100% open source, so you can do whatever you need to make it work with your store. Think other Magento store owners would benefit from your improvements? Send us a pull request.

Fork our project on GitHub.

Step 1 - Create an Apruve Merchant account

In the Magento Apruve configuration you have the choice of selecting one of two modes: Test or Production. We suggest that you test your store in Test mode first to ensure that the integration is working properly. Then you can switch it to Production and begin accepting orders.

If you want to integrate with Apruve's test or production (live) servers, you can contact us to get started.

You will receive an email containing a link to confirm the account - you'll need to confirm it before you can move forward and use it.

Step 2 - Install the Extension

In this step, we'll add the Magento Extension for Apruve to your Magento store.

Get the Extension Key

Visit the Magento Marketplace page for the extension 2.x ).

extension page

Click the "Add to Cart" button.
extension install button

Go to the Checkout page.
extension checkout button

Fill out the order form and click "Place Order".
magento order form

Click the "Install" button from the order confirmation page, which will bring you to a page containing your access keys.

Then, click the "Copy" link to copy the key to your clipboard.
copy extension key

Install the Extension

The Apruve plugin can be installed in a number of ways, either via Composer or SFTP.

Step 3 - Configure the Extension

Now that the extension has been installed on your Magento store, we'll connect your Magento store to your account on
Apruve.

Enable the extension, and set test vs. production

In your Magento Admin Panel, navigate to Stores -> Configuration -> Sales

1240

On the left, click on Payment Methods.

2048

Expand the Apruve Payment section.

2048

Set Enabled to true and Test Mode to Yes if connecting to test.apruve.com. (set Test Mode to No if connecting to app.apruve.com)

Set your Merchant ID

Open another browser window... Log into your Apruve, view your store profile (on test: https://test.apruve.com/
or on production: https://app.apruve.com/.

You can find your Merchant ID by clicking on "Settings" and then on the "Technical" tab. Copy the Merchant ID to your clipboard.

enabled, test

Back in your Magento Admin Panel... paste in the value for your Merchant ID

Set the API Key

Back In the Apruve window... Locate your API Key or follow the instructions to create one.

Copy the API Key to your clipboard

create api-key

Back in your Admin Panel... paste in the value for your API Key

Save your configuration

Step 4 - Set the Web Hook

Your Magento store is now connected to Apruve. The only thing left to do is to tell Apruve how to contact your store when someone pays for your shopper's purchase. This is done through something called a "Web Hook".

Set your store's Web Hook URL in Apruve

When you saved your Apruve Payment configuration in the Admin Panel, a Webhook URL was created. Copy this to your clipboard.

In the Apruve window... Pase the Webhook URL into the Notifications section.

912

Paste the Webhook URL in the field, and save.

apruve technical nav

Important - you will need to clear the Magento cache before you attempt to use Apruve as a payment method in checkout!

Step 5 - Test

The Magento Extension for Apruve is now installed and configured.

Let's buy something!

Go through a complete transaction, selecting Apruve as the payment method.

2048

Once the checkout process is complete, your order status should show Pending. This means your API Key and Merchant ID are configured correctly.
pending status

When the merchant logs into Magento admin and ships the item Apruve will create an invoice automatically for the items shipped and pass the shipping and invoice details to Apruve.

The invoices generated in Magento will be “Pending” status and when the invoice is closed in Apruve the status for invoice in Magento will change to “Paid”. This means your Webhook URL is configured correctly.

If all the items are shipped and invoiced, and the invoice is closed/paid the order status changes to “Complete” in Magento.

Key Notes

  • Once shipped an invoice should not be canceled.
  • Once an order is accepted in Apruve it cannot be canceled.
  • Returns or Refunds need to be handled separately in Magento and Apruve

processing status

All done...?

At this point, make sure you test anything else related to your payment and order processing to ensure it works as you expect with Apruve.

If you have any questions, drop us a line at [email protected].
And don't forget, all the source code for the extension can be found on our GitHub page.