
CarrickTan
Member-
Posts
11 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Hotfixes
Everything posted by CarrickTan
-
It works! Thank you for your help.
-
Hey guys, I have been facing this problem and I can't figured out where is the source of the problem actually. My WHMCS index.php will automatically redirects to clientarea.php. But I didn't pre-configured any redirects as well... Do you guys ever met this before? Anyone know how to solve this? Regards, Carrick
-
Hi gbrennae, It's after the call back. So my server is issuing the Error 310. But after few days back, I check my gateway log. It does records one transaction with the results "Unsuccessful". But why the callback doesn't automatically update it and shows me Error 310 with too many redirects?
-
Hi gbrennae, I had just check with my payment provider.... They told me only ['returncode'] for "E2" is Unsuccessful, else all returning code is Successful. So, I wrote it in this way... <?php # Required File Includes include("../../../dbconnect.php"); include("../../../includes/functions.php"); include("../../../includes/gatewayfunctions.php"); include("../../../includes/invoicefunctions.php"); $gatewaymodule = "webcash"; # Enter your gateway module name here replacing template $GATEWAY = getGatewayVariables($gatewaymodule); if (!$GATEWAY["type"]) die("Module Not Activated"); # Checks gateway module is active before accepting callback # Get Returned Variables - Adjust for Post Variable Names from your Gateway's Documentation $status = $_POST["returncode"]; $invoiceid = $_POST["ord_mercref"]; $transid = $_POST["returncode"]; $amount = $_POST["ord_totalamt"]; $invoiceid = checkCbInvoiceID($invoiceid,$GATEWAY["name"]); # Checks invoice ID is a valid invoice number or ends processing checkCbTransID($transid); # Checks transaction number isn't already in the database and ends processing if it does if ($status=="E2") { # Unsuccessful logTransaction($GATEWAY["name"],$_POST,"Unsuccessful"); # Save to Gateway Log: name, data array, status } else { # Successful addInvoicePayment($invoiceid,$transid,$amount,$gatewaymodule); # Apply Payment to Invoice: invoiceid, transactionid, amount paid, modulename logTransaction($GATEWAY["name"],$_POST,"Successful"); # Save to Gateway Log: name, data array, status} } ?> But I ended up with Error 310 (net::ERR_TOO_MANY_REDIRECTS)
-
Hi gbrennae, I will try to check again with the payment provider for the status parameter. Thanks for your help! Thanks laszlof for concerning =)
-
I believes the problem happens at the status part... $status = $_POST["returncode"]; The gateway provider don't offer me the SUCCESSFUL vars for me to use in the $status... I have no idea how the gateway query works, but I was given two URL... One is for where the payment system works... and another one was for query, and the Successful returning code is "S"... But I have no idea how to make two URL works where one is the Returning Transaction Code value, and one is the Query of Successful Value...
-
This is the returning parameters from the gateway merchants... Array ( [ord_date] => 11 November 2010 [ord_totalamt] => 100.00 [ord_shipname] => John Doe [ord_shipcountry] => Malaysia [ord_mercref] => Order 32212 [ord_telephone] => 0172222222 [ord_email] => demo@xyz.com.my [ord_delcharges] => 0.00 [ord_svccharges] => 0.00 [ord_key] => OFl>lBZ}alBT`3e+jtM%h_7 [ord_mercID] => 80000321 [wcID] => 20000030 [returncode] => 100-20000030 ) There're query parameters which could be retrieve from https://webcash.com.my/testwebcash/enquiry.php These are returning value... ord_mercID = Merchant ID ord_mercref = Order Reference which is my Invoice ID ord_totalamt = Order Total The query reply should be : S = Success (Payment Received) P = Transaction Incomplete (Pending) A = User Abort Transaction (Fail) Invalid Parameters = Invalid Parameters Record Not Found = Record Not Found
-
Hi gbrennae, Oh yeah! I forgot to share my code here... No wonder.... Well, this is the gateway code... It works fine... <?php function webcash_config() { $configarray = array( "FriendlyName" => array("Type" => "System", "Value"=>"WebCash"), "username" => array("FriendlyName" => "WebCash Merchant ID", "Type" => "text", "Size" => "8", ), "transmethod" => array("FriendlyName" => "Transaction Method", "Type" => "dropdown", "Options" => "WebCash Prepaid,Internet Banking Services,Credit Card", ), "instructions" => array("FriendlyName" => "Payment Instructions", "Type" => "textarea", "Rows" => "5", "Description" => "The instructions you want displaying to customers who choose this payment method - the invoice number will be shown underneath the text entered above.", ), "testmode" => array("FriendlyName" => "Test Mode", "Type" => "yesno", "Description" => "Tick this to running in test mode.", ), ); return $configarray; } function webcash_link($params) { # Gateway Specific Variables $gatewayusername = $params['username']; $gatewaytestmode = $params['testmode']; # Invoice Variables $invoiceid = $params['invoiceid']; $description = $params["description"]; $amount = $params['amount']; # Format: ##.## $currency = $params['currency']; # Currency Code # Client Variables $firstname = $params['clientdetails']['firstname']; $lastname = $params['clientdetails']['lastname']; $email = $params['clientdetails']['email']; $address1 = $params['clientdetails']['address1']; $address2 = $params['clientdetails']['address2']; $city = $params['clientdetails']['city']; $state = $params['clientdetails']['state']; $postcode = $params['clientdetails']['postcode']; $country = $params['clientdetails']['country']; $phone = $params['clientdetails']['phonenumber']; # System Variables $companyname = $params['companyname']; $systemurl = $params['systemurl']; $currency = $params['currency']; # Enter your code submit to the gateway... $code = '<form action="https://webcash.com.my/testwebcash/wcgatewayinit.php" method="post"> <input type="hidden" name="ord_date" value="07 April 2012"> <input type="hidden" name="ord_shipname" value="'.$firstname.' '.$lastname.'"> <input type="hidden" name="ord_mercref" value="'.$invoiceid.'"> <input type="hidden" name="ord_shipcountry" value="'.$country.'"> <input type="hidden" name="ord_totalamt" value="'.$amount.'" /> <input type="hidden" name="ord_delcharges" value="0.00"> <input type="hidden" name="ord_svccharges" value="0.00"> <input type="hidden" name="ord_telephone" value="'.$phone.'"> <input type="hidden" name="ord_email" value="'.$email.'"> <input type="hidden" name="ord_returnURL" value="http://billing.hostsurf.com.my/gateways/callback/webcash.php"> <input type="hidden" name="ord_mercID" value="'.$gatewayusername.'"> <input type="submit" name="submit" value="Pay with Webcash"> </form>'; return $code; } ?>
-
Anyone help me out??? Please.... Thanks
-
Hi there, I faced some error while trying to edit from the downloaded kit. The transaction was done successfully. The problem occurs on the callback part. It was unable to returned to the page. The page keep loading or else I have to manually end the session. The payment was not updated automatically. Is there anyone here developed their own payment gateway module? Mind share your experience on this particular issue? Please help me out on my problem.... Please and thanks!