remcorhee Posted January 7, 2011 Share Posted January 7, 2011 Hi! I am trying to integrate another payment gateway. Its slowly getting there.. but WHen I try to pay with this method, it still asks the client to give creditcard-name, number, etc. But it shoud be re-directed to icepay...how to delete the CC-part and let it go to the gateway of icepay. the code i used in the .php file (sorry, it's still a bit messy, but then I know where I came from ) <?php function iDeal_config() { $configarray = array( "FriendlyName" => array("Type" => "System", "Value"=>"iDeal"), "instructions" => array("FriendlyName" => "Betalingsinstructie", "Type" => "textarea", "Rows" => "5", "Description" => "Do this then do that etc...", ), ); return $configarray; } function iDeal_link($params) { # Gateway Specific Variables $gatewayusername = $params['username']; $gatewaytestmode = $params['testmode']; $IC_Merchant ="12818"; $IC_Country = "NL"; $IC_Encryptioncode = "n9TLr43SmMa56Hpt7E8WdZz39Nbu5AGf4c7D8Rsq"; $IC_PaymentMethod = "IDEAL"; $IC_Issuer = "ABNAMRO,ASNBANK,FORTIS,FRIESLAND,ING,RABOBANK,SNSBANK,TRIODOSBANK"; # Invoice Variables $invoiceid = $params['invoiceid']; $IC_OrderID = $params['invoiceid']; $description = $params["description"]; $IC_Description = $params["description"]; $amount = $params['amount']; # Format: ##.## $currency = $params['currency']; # Currency Code $IC_Amount = $params['amount']; # Format: ##.## $IC_Currency ="EUR"; # Currency Cod $IC_Language ="NL"; # Client Variables $firstname = $params['clientdetails']['firstname']; $lastname = $params['clientdetails']['lastname']; $ConsumerName = $params['clientdetails']['firstname']['lastname']; $email = $params['clientdetails']['email']; $ConsumerEmail = $params['clientdetails']['email']; $address1 = $params['clientdetails']['address1']; $address2 = $params['clientdetails']['address2']; $ConsumerAddress = $params['clientdetails']['address1']; $ConsumerHouseNumber = $params['clientdetails']['address2']; $city = $params['clientdetails']['city']; $ConsumerCity = $params['clientdetails']['city']; $state = $params['clientdetails']['state']; $postcode = $params['clientdetails']['postcode']; $country = $params['clientdetails']['country']; $Consumer_Country = $params['clientdetails']['country']; $phone = $params['clientdetails']['phonenumber']; $ConsumerPhoneNumber = $params['clientdetails']['phonenumber']; # System Variables $companyname = $params['companyname']; $systemurl = $params['systemurl']; $currency = $params['currency']; # aanmaken checksumcode gevraagd door IcePay $IC_Checksum = SHA1($IC_Encryptioncode."|".$IC_Merchant."|".$IC_Amount."|".$IC_Currency."|".$IC_OrderID."|".$IC_PaymentMethod."|".$IC_Issuer); # Enter your code submit to the gateway... $code = '<form method="POST" action="https://pay.icepay.eu/checkout.aspx"> <input type="hidden" name="ic_paymentMethod" value="CREDITCARD"> <input type="hidden" name="ic_issuer" value="'.$IC_Issuer.'"> <input type="hidden" name="ic_merchant" value="'.$IC_Merchant.'"> <input type="hidden" name="ic_amount" value="'.$IC_Amount.'"> <input type="hidden" name="ic_currency" value="'.$IC_Currency.'"> <input type="hidden" name="ic_language" value="'.$IC_Language.'"> <input type="hidden" name="ic_country" value="'.$IC_Country.'"> <input type="hidden" name="ic_orderid" value="'.$IC_OrderID.'"> <input type="hidden" name="ic_description" value="'.$IC_Description.'"> <input type="hidden" name="ic_checksum" value="'.$IC_Checksum.'"> <input type="submit" value="Betalen" /> </form>'; return $code; } ?> Hope you can help, best regards, Remco 0 Quote Link to comment Share on other sites More sharing options...
remcorhee Posted January 7, 2011 Author Share Posted January 7, 2011 Sort out a lot of things allready Is there a way to change the format of the amount? Icepay wants it in cents.... so without the "." Hope you can help. Best Regards, Remco 0 Quote Link to comment Share on other sites More sharing options...
plazmahost Posted January 10, 2011 Share Posted January 10, 2011 Sort out a lot of things allready Is there a way to change the format of the amount? Icepay wants it in cents.... so without the "." Hope you can help. Best Regards, Remco Hi Mate, We have our own custom module and for the payment gateway it only accepts whole numbers e.g. 637 < £6.37 the code we use is : .number_format($amount, 2, '', ''). < im not sure how your gateway pulls data but ours is as it says so the $amount is pulled directly from the invoice hope this helps dan 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.