payfast payment gateway integration using codeigniter
If your notify_url does not return a header 200
response, you will not be able to receive the return variables from PayFast.
Below is a bare minimum example of the ITN code:
// Notify PayFast that information has been received - this is requiredheader( 'HTTP/1.0 200 OK' );flush();// Posted variables from ITN -the return variables$pfData = $_POST;// Update dbswitch( $pfData['payment_status'] ){ case 'COMPLETE': // If complete, update your application break; case 'FAILED': // There was an error, update your application break; default: // If unknown status, do nothing (safest course of action) break;}
Look at my answer for the this question for information.
please must enter these three url returnnotify ,cancel