Installation guide for recurring—WooCommerce

Please ensure that you already have the WooCommerce plugin installed.

1. Make sure that you already have WooCommerce plugin installed and activated. Also make sure you have the zip file ‘senangpay-payment-gateway-recurring-for-woocommerce’. You can download the zip file here.

2.From your WordPress admin dashboard, go to Plugins > Add New.

3. Click Upload Plugin > Choose File, choose ‘senangpay-payment-gateway-recurring-for-woocommerce.zip’ > Install Now.

2

4. Once successful, activate the plugin through the ‘Plugins’ screen in WordPress admin dashboard and click ‘Activate’.

3-1536x122

5. Go to WooCommerce > Settings > Payments > senangPay recurring > Manage. Fill in your merchant id and secret key. You can retrieve the merchant id and secret key from senangPay Dashboard :  

6. By default, the hash type will be md5, but you may change it later to sha256 which senangPay strongly recommends. You may refer to the hash type defined in the senangPay dashboard.

7. The environment mode by default is live. However, if your website is not ready for production and is only for testing, you may choose sandbox (This requires you to have a sandbox account).

8. Tick "Enable this payment gateway" > Save changes 

4

9. In senangPay Dashboard, make sure you:

  • Key in your return recurring URLhttp://your_domain/wp-json/recurring/return 
  • Key in your callback recurring URLhttp://your_domain/wp-json/recurring/callback

Choose ‘Read response and send email if error’ for callback response > Save. Please leave the ‘Return URL Parameters’ field empty.

10. Also tick on ‘Enable advance callback (Will send JSON object).

11. Sample show below how the order id will look when customer do recurring. First order will be #100 senang pay, second transaction will be #110_2 senang pay and so on.

A. Create recurring product

1. Create a subscription or instalment in the senangPay dashboard and copy the Recurring ID. Example:

6-1536x280

or

7-1536x266

2. In WooCommerce, go to Products > Add New

3. Key in the product details, then on Product data, click Attributes and add ‘recurring’. The value is the Recurring ID from the product created inside senangPay. Finally, click "Save attributes" and publish.

9