The integration to Paynow should take the necessary steps to handle actions from the time a user on the merchant site clicks the “Buy”, “Pay” or any such buttons on a page on the merchant site, to the time the user is taken back to the shopping cart / web page that served him with the shopping functionality.

The following steps aim to summarise that, and a diagram is given below to visually explain the process

Click the image below to have an overview of the process that takes place when your site is fully integrated.

paynow integration overview

  1. User clicks a “Pay on Paynow” button on your site
  2. The integration code should handle the action, and attempt to create a NEW Paynow transaction by submitting POST data to the https://www.paynow.co.zw/interface/initiatetransaction url strictly following the requirements specified in the step by step devdocs section on this site.
  3. The response from step 2. above should be scanned and checked for success or failure in creating the transaction. The simple most common failure reason would be a malformed POST in step two or wrong hash value generation in that same step.
  4. If the response is a ‘Status’=Ok┬áresponse, then the merchant site must immediately save the initial transaction data comprising
    • Status – the current status of the payment: delivered, paid etc
    • BrowserUrl – the url on Paynow the created transaction can be viewed and acted upon.
    • PollUrl – the URL on Paynow that the merchant site can constantly retrieve data from concerning the status of the payment.
    • hash – the hash value of the submitted for as specified in the devdocs for creating a hash value for Paynow communication.
  5. After step 4, the merchant site must redirect the user to complete their payment on BrowserUrl saved in step 4
  6. The user is handled by Paynow website until they cancel or approve the Payment.
  7. After all Paynow operations, Paynow posts to the resulturl sent to Paynow in step 2 above. This is a url on the merchant site which listens for a post from Paynow that updates payment status data.
  8. Finally, Paynow will redirect the user back to the returnurl also sent in step 2 above, and that’s done; you receive your payment.