12. FAQs

ITN

I’m getting a signature mismatch error, why?

This is most likely caused if you generated the MD5 hashed string with the variables in the wrong order, they need to be in the order as they appear in the tables above. Another reason could be that you have not urlencoded the variable values and trimmed all white spaces off the ends using php’s trim() function. The resultant urlencoding must be in upper case (eg. http%3A%2F%2F), and spaces encoded as ‘+’.

If you have set a pass phrase to your account, remember that it needs to be included at the end of the string prior to the hash function.

Why am I not receiving the ITN callback?

There could be many reasons for this to occur:

  • You’ve modified Pay Now button code

ITN callbacks are only triggered for standard integration and are not triggered for Pay Now button integration. If you have taken Pay Now button code and modified it to include the notify_url value for the purposes of receiving an ITN callback, it will not work.

Specifically if you have included the two fields below in your HTML form posted to PayFast, ITN will not be triggered (even if you’ve specified the notify_url field):

<input name="cmd" type="hidden" value="_paynow" />
<input name="receiver" type="hidden" value="[EMAIL_ADDRESS]" />

You need to change these two fields to rather use your merchant identifiers as follows:

<input name="merchant_id" type="hidden" value="[MERCHANT_ID]" />
<input name="merchant_key" type="hidden" value="[MERCHANT_KEY]" />
Remember to remove the cmd and receiver fields!

 

  • Your ITN page is unreachable

The URL specified by your notify_url variable could be unreachable.

To test this, open a browser and navigate to the URL yourself. Ensure that the page is in fact reachable and returns a valid HTML response (200 OK etc.).

If your browser times out or gets a 500 error response, then the page is unreachable and indicates that there could be a problem with your web server configuration. Contact your system administrator to resolve this.

  • Your ITN page performs a 302 redirect

If your notify page tries to redirect to another page immediately, it might not look like your are receiving the ITN callback, as, for security reasons, ITN does not follow redirects.

Ensure that all the processing which needs to occur, occurs at the notify_url location itself without requiring a redirect to another location.

Typical instances where this occurs without your knowledge, is where your notify_url is actually protected by a login mechanism and when the PayFast server tries to POST to it, the system redirects to a login page asking for a username and password.

Test this, by clearing all session cookies (or using a different browser) and navigating to the page yourself. If it redirects you to another page, that’s your problem.

  • You are making use of an incorrect port

PayFast makes use of ports 80, 8080, 8081 and 443 only.

I get the error ‘invalid Merchant ID

There could be a number of reasons for this:

  • You are using the sandbox (test) credentials on the live site

By default, our payment modules use the sandbox credentials and are set to point to the sandbox site.

Check your payment module configuration and ensure that you are using your live credentials and that you are set to use the live site.

Your Merchant ID and Merchant Key are available on the integration page.

  • Your account type isn’t eligible to receive payments

Only Individual, Business or Cause accounts are issued Merchant IDs and Merchant Keys. Check your account type on your Account page. If you don’t have the required account type, you’d need to click the upgrade account button and follow the system prompts to provide any missing information.

Note: Your account may have been downgraded during Oct/Nov 2009 which is why it is no longer a Business account

All you need to do is provide the outstanding documentation to upgrade your account again. Please note that your Merchant Key will change during the upgrade process and you’ll need to re-enter it into your payment module configuration.

 

Pay now buttons

Can I accept donations with these buttons?

Yes, you can, but only if you are a registered NPO (Non Profit Organisation).

Unfortunately, we are prevented by South African law from accepting “donations”  where the receiver is not a registered NPO (something you can do in other countries).

Do you have an “add to cart” button?

Pay now buttons are intended for single item purchases and are not linked to a hosted shopping cart.

We don’t currently have a hosted shopping cart solution and therefore don’t have an “Add to cart” button. That said, there are over sixty shopping carts with PayFast integration available, if you require shopping cart functionality.

I get the error message “Receiver must be a valid email address” when clicking on my Pay Now button.

Joomla!

If your site is built with Joomla!, then this error is probably caused by the Content - Email Cloaking plugin in Joomla!.

Turn it off by placing the following text in the article where the button is:

{ emailcloak=off}

WordPress

If your site is built with WordPress, then this error is most likely caused by the reCAPTCHA plugin in WordPress.

Turn it off by changing the value of the receiver field in the Pay Now button code as below:

<input name="receiver" type="hidden" value="your.email@address.co.za" />

must be changed to:

<input name="receiver" type="hidden" value="[nohide]your.email@address.co.za[/nohide]" />

How do I made make the amount user-selectable?

To make a user enter-able amount on the pay now button, simply replace the amount field in the generated code with the following line:

Amount <input name="amount" type="text" value="" />

How do I change the button to use a different image?

To change the image used in the Pay Now button, simply change the value of the image field in the generated code.

The Pay Now button will have an image field similar to the following (depending on your selection of button):

<input title="Buy Now with PayFast" alt="Buy Now" height="26" src="https://www.payfast.co.za/images/buttons/buynow_basic.gif" type="image" width="95" />

Simply change the https://www.payfast.co.za/images/buttons/buynow_basic.gif to a different URL for your image.

Remember to update the width and height attributes to the correct values for your chosen image.

 

Request money

Can the buyer pay by credit card?

The buyer will be able to pay via any of payment methods offered on your account. If you are able to accept payments funded by credit cards, then yes, the buyer will be able to pay via credit card.

Does a money request ever expire?

Yes, a money request will expire two weeks from the date it was originally sent. It must be fulfilled by this time or it will lapse and you will need to create a further request if needed.

You can review your payment requests by logging into your PayFast account and clicking on the History tab.