Maybe your customer should apply for a merchant account first, and see if they are credit worthy before you try and write any code. Merchant accounts and payment gateways have many sorts of hidden rules, like PayPal won't approve a pawn shop, guns, pornography, casino's, online gambling, the list goes on and on. Your a programmer, you can't tell your customer that they have to use a certain company for electronic payments. 50% of applicants get rejected.