Jump to content

Gateway Module - result page in blank


Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated