las.leticia Posted July 14, 2009 Share Posted July 14, 2009 Hi I install a gateway module following the "WHMCS Gateway Module Documentation" and using the Development Kit. The documentation to build a WHMCS module with a full integration say the follow in Point 5 of the : "If a merchant gateway (payment by credit card on your site) then delete the _link function (line 14) and enter your card processing code into the _capture function" The code of my plugin to return the result is the same that appears when you see the "_capture function" of the module template that comes with the Gateway Development Kit: # Return Results if ($soap_status=="success") { return array("status"=>"success","transid"=>$soap_transid,"rawdata"=>$soap_result); } elseif ($soap_status=="declined") { return array("status"=>"declined","rawdata"=>$soap_result); } else { return array("status"=>"error","rawdata"=>$soap_result); } The problem is that after the client Checkout the Invoice payment, WHMCS returns a blank page. Is necessary put other code to show to client the result (Success or Fail) of processing? Thanks in advanced Leticia 0 Quote Link to comment Share on other sites More sharing options...
gingerol Posted July 15, 2009 Share Posted July 15, 2009 Hi Is necessary put other code to show to client the result (Success or Fail) of processing? Thanks in advanced Leticia Yes, and this code has to be in your callback script within the folder: /gateway/callback/"paymentgateway.php" 0 Quote Link to comment Share on other sites More sharing options...
las.leticia Posted July 18, 2009 Author Share Posted July 18, 2009 Hi I add a callback file for this gateway with the code (...) # Get Returned Variables $status = $_POST["status"]; $transid = $_POST["transid"]; (...) if ($status=="success") { # Successful addInvoicePayment($invoiceid,$transid,$amount,$fee,$gatewaymodule); logTransaction($GATEWAY["name"],$_POST,"Successful"); } else { # Unsuccessful logTransaction($GATEWAY["name"],$_POST,"Unsuccessful"); } But still WHMCS returns a blank page in http://myserver/creditcard.php The rest of the code in the callback page is as Developer Kit say. In the plugin script, besides the "_capture" function I use the "_link" function to show the form with an specific validation code I need for this gateway, and the action of this form is set to "http://myserver/creditcard.php". Thanks in advanced Leticia 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.