mdwebhosting Posted March 5, 2009 Share Posted March 5, 2009 Hi Guys, I'd like to create a "Pay Now" button in the invoice so when the client logins to their client area to view the invoice, they can manually click on the "Pay Now" button to make payment. These are the codes. function anzegate_link($params) { // Gateway URL $vpcURL = "https://migs.mastercard.com.au/vpcdps"; // Varibales to pass to gateway $vpc_Version = "1"; $vpc_Command = "pay"; $vpc_Merchant = $params['vpc_Merchant']; $vpc_AccessCode = $params['vpc_AccessCode']; $vpc_MerchTxnRef = $params['invoiceid']."/".date('ymdHis'); $vpc_OrderInfo = $params['invoiceid']; $vpc_Amount = intval($params['amount']*100); $vpc_CardNum = "5123456789012346"; $vpc_CardExp = "1305"; # Enter your code submit to the gateway... $code = ' <form action="../VPC_PHP_2P_CSC.php" method="post"> <input type="hidden" name="virtualPaymentClientURL" value="'.$vpcURL.'"> <input type="hidden" name="vpc_Version" value="'.$vpc_Version.'"> <input type="hidden" name="vpc_Command" value="'.$vpc_Command.'"> <input type="hidden" name="vpc_AccessCode" value="'.$vpc_AccessCode.'"> <input type="hidden" name="vpc_MerchTxnRef" value="'.$vpc_MerchTxnRef.'"> <input type="hidden" name="vpc_Merchant" value="'.$vpc_Merchant.'"> <input type="hidden" name="vpc_OrderInfo" value="'.$vpc_OrderInfo.'"> <input type="hidden" name="vpc_Amount" value="'.$vpc_Amount.'"> <input type="hidden" name="vpc_CardNum" value="'.$vpc_CardNum.'"> <input type="hidden" name="vpc_CardExp" value="'.$vpc_CardExp.'"> <input type="submit" name="SubButL" value="Pay Now"> </form> '; return $code; } As you can see that I've to hardcoded the credit card details for the time being as the function anzegate_link($params) doesn't automatically pick up the details as function anzegate_capture($params) does. Please advise. Thanks. 0 Quote Link to comment Share on other sites More sharing options...
Shaun Posted March 5, 2009 Share Posted March 5, 2009 Is your gateway type set to invoice or credit card If you want to use the link type it should be a "Invoice". 0 Quote Link to comment Share on other sites More sharing options...
mdwebhosting Posted March 6, 2009 Author Share Posted March 6, 2009 Hi Shaun, Thank you for your reply. However, if I change the type to invoice, can I still make use of the function anzegate_capture($params)? Thanks. 0 Quote Link to comment Share on other sites More sharing options...
Shaun Posted March 6, 2009 Share Posted March 6, 2009 Let me explain is a little more. There are 2 types of whmcs gateways. Invoice and Credit Cards. Credit Card ones are ones that use the capture, and invoice ones use the link. The idea is that the CC ones are run via the cron to do it all beind the users back. While the invoice ones are initiated via a user clicking ok. The idea with the link ones is that they usually have to enter more data at the gateway (eg payapl info). I persoanlly think you should use the CC one in your case as you will be getting CC data from the DB. Feel free to MSN me to pick my brain. 0 Quote Link to comment Share on other sites More sharing options...
biovolt Posted March 13, 2009 Share Posted March 13, 2009 Where do you then capture the CC data? How do you get the CC data into the db? 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.