Borrowing from SinePay Express, the SinePay Payment Plugin for WooCommerce is designed to do on-site payment processing (no redirects) using both JavaScript (JS) and PHP calls. Using only three calls: the pre-call, the payment confirmation, and final order processing, payments can be received from M-Pesa, Airtel Money, SinePay eWallet, and all other sources supported by SinePay Core Engine.
A pre-flight call is made by JS as soon as the person clicks on ‘Go to Checkout’ containing bare minimum transaction details as complete details will only be available after order placement. The pre-call returns with codes ready to be used for HTML rendering which will guide on payment making process.
On choosing SinePay as the processor, payment options will be presented, payment should be made as per one of the choices, and confirmation done by the client. A second JS call is then made to verify that the payment was made and if so, some updates are done at the server-side on the first call data. Success or failure messages are instantly returned when the ‘Confirm Payment’ button is pressed.
If the payment was successful, the internal WooCommerce ‘Place Order’ button will be automatically actioned and the final payment confirmation begins. The order details will be posted to the normal order-processing page where they will be captured for all necessary details – including SinePay’s own eShop identification tokens. These will be posted to SinePay servers for processing via PHP. At the server, the records will be re-validated and if correct, updates will be done including the internalization of the transaction as per the SinePay Core Engine (the 8-step transaction logging) automatically. A final ERROR or APPROVED message will then be returned instantly to the calling page. This result will be interpreted by the eShop resident payment gateway codes to either action the page to Success or Failure page. This ends the payment processing process.
Document Control Number: 2020/12/01
- Upload \"sinepay-gateway\" to the \"/wp-content/plugins/\" directory.
- Activate the plugin through the \"Plugins\" menu in WordPress.
- Then proceed on this order below: pre-setup, and then setup
Pre-setups
i) The eShop first needs to have a SinePay mobile app installed and eWallet ID noted down; get it on Google Play Store;
ii) The eShop next need to register at www.sinepay.net > sinepay plus > Register Business > Register Online Shop; this will create the necessary credentials to be used here.
iii) As for now, only the Hash Code is required for eShop Identification by the plugin.
iv) The username and Merchant Id are used for internal eShop management at SinePay website.
v) The plugin can now be installed and activated using the Hash Code.
vi) This will bring the eShop files which will be automatically linked to the activation values
vii)Ensure that your sale currency is set to Kenya Shillings in your eShop; WooCommerce > Settings > General > Currency Options.
Setups
i) After this the plugin needs to be installed; if it is not already installed by uploading its folder to your wp-content/plugins directory;
ii) First, activate it on WordPress: Plugins > SinePay Payment Gateway for WooCommerce > Activate
iii)Then on WooCommerce as: WooCommerce > Settings > Payments > (SinePay Payment Gateway) > On
iv) Details should be set via: Manage (above screen, or Setup);
v) The eShop Hash Code must be given as per the registration’s Hash Code in pre-setups; password can be given but is not used for now.
v) That’s about it; the eShop is ready for SinePay payment processing; Save the changes.
Initial release.