Installation Guide senangPay recurring for WooCommerce

1. Make sure that you already have WooCommerce plugin installed and activated. Also make sure you have senangPay Stripe zip file ‘senangpay-payment-gateway-recurring-for-woocommerce’.

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 .

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

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 :  

  • For Live account : https://app.senangpay.my 
  • For Sandbox account : https://sandbox.senangpay.my 

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

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

8. Tick ‘Enable this payment gateway’ > Save changes 

9. In senangPay Dashboard make sure you :

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

and 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 etc.

12. Please download the plugin file below:

 

A. Create recurring product

1. Create subscription or installment inside senangPay dashboard and copy recurring id. Example:

or

2. In wordpress, go to Products > Add New

3. Key in price and other product detail, after that on Product data click Attributes > Add ‘recurring’ and value is recurring id from product created inside senangPay > Save > Publish.