include "Sfa/PostLibPHP.php"; include "Sfa/PGReserveData.php"; $oMPI = new MPIData(); $oCI = new CardInfo(); $oPostLibphp = new PostLibPHP(); $oMerchant = new Merchant(); $oBTA = new BillToAddress(); $oSTA = new ShipToAddress(); $oPGResp = new PGResponse(); $oPGReserveData = new PGReserveData(); $oMerchant->setMerchantDetails("00012849", "00012849", "00012849", "193.545.34.33", rand() . "", "Ord123", $baseurl . "payment/SFAResponse.php", "POST", "INR", "INV123", "req.Sale", $applicationfees, "", "Ext1", "true", "Ext3", "Ext4", "Ext5"); $oBTA->setAddressDetails("CID", "Tester", "JBIMS", "Mumbai", "Maharashtra", "Test", "Test", "Test", "IND", "*****@*****.**"); $oSTA->setAddressDetails("Add1", "Add2", "Add3", "City", "State", "443543", "IND", "*****@*****.**"); $INRapplicationfees = "INR" . $applicationfees; $applicationfeespaisa = $applicationfees * 100; $oMPI->setMPIRequestDetails($applicationfeespaisa, $INRapplicationfees, "356", "2", "JBIMS Admission", "", "", "", "0", "", "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*", "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"); $oPGReserveData->setReserveObj($applicationid, $applicantName, $applicantemailid, $applicationfees, "5", "6", "7", "8", "9", "10"); $oPGResp = $oPostLibphp->postSSL($oBTA, $oSTA, $oMerchant, $oMPI, $oPGReserveData); if ($oPGResp->getRespCode() == '000') { $url = $oPGResp->getRedirectionUrl(); //$url =~ s/http/https/; //print "Location: ".$url."\n\n"; //header("Location: ".$url); redirect($url); } else { print "Error Occured.<br>"; print "Error Code:" . $oPGResp->getRespCode() . "<br>"; print "Error Message:" . $oPGResp->getRespMessage() . "<br>"; } // This will remove all white space //$oResp =~ s/\s*//g;