0

H friends i need your help again

I have shooing site where user can pay through credit card . There are a general form where user submit primary data then he redirect to payment getaway provider page to give his credit card info please check the demo url

http://hostingcare.co.in/payment/testpage1.php

now i want to create a custom form where user will put all the data together and background program will remotely post data to payment getaway. if payment done or failed user will get responce within my site . user need not to go payment getaway page.

I have write this CURL Post but it is not fulfill my need. Please suggest what to do

//create array of data to be posted
$post_data['Name'] = 'xxx';
$post_data['ContactNo'] = 'xxx';
$post_data['MobileNo'] = 'xxx';
$post_data['Email'] = 'xxx@gmail.com';
$post_data['PaymentMode'] = 'Credit Card';
$post_data['CardProvider'] = 'VISA';
$post_data['CardNumber'] = '4335900000120054';
$post_data['CardExpiryMonth'] = '12';
$post_data['CardExpiryYear'] = '2019';
$post_data['SecurityCode'] = '675';
$post_data['CardHolderName'] = 'xxx';
$post_data['CurrencyCodecon'] = 'INR';

$post_data['MerchantId'] = 'nias';
$post_data['Amount'] = '100';
$post_data['INRAmount'] = '100';
$post_data['ReferenceNo'] = '11820269961381618768';
$post_data['CheckSum'] = '62a09afb36327a4a4f64efb8cc51b89ef4f1efd59f17c05996a0c3592d958ff6';
$post_data['Password'] = 'nias';
$post_data['CurrencyCode'] = '356';
$post_data['RemoteIP'] = '10.10.10.50';

//traverse array and prepare data for posting (key1=value1)
foreach ( $post_data as $key => $value) {
    $post_items[] = $key . '=' . $value;
}
//create the final string to be posted using implode()
$post_string = implode ('&', $post_items);
//create cURL connection
$curl_connection =
  curl_init('https://cellpay.essecom.com/PaymentGateway/Payment.jsp');
//set options
curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($curl_connection, CURLOPT_USERAGENT,
  "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1);
//set data to be posted
curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string);
//perform our request
$result = curl_exec($curl_connection);
//show information regarding the request
print_r(curl_getinfo($curl_connection));
echo curl_errno($curl_connection) . '-' .
                curl_error($curl_connection);
$result = curl_exec($ch);
curl_close($ch);
//echo $result;
$contents = curl_exec ($curl_connection);
echo "<br>".$contents;
//close the connection
curl_close($curl_connection);
3
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by Jessy1pooh
0

This may be a convenience for the user but it may also reduce the security and possibly the trust in the process. Credit card processors have high security sites because of the nature of the business. Sending the user to the third party site means that you don't have to get involved in the financial part of the process (you aren't collecting sensitive data). The user may have more concern giving the credit card info to you than they would giving it to a Credit Processor. You have a greater responsibility to make your site more secure, have a published privacy policy and so forth. You Credit Processor may not be happy with this either. If they no longer have direct contact with the customer, they may not take any responsibility if there are any problems.

0

thanks for your advice but dear friend it is my client need so i have to do this and client will handle the farther issue with getaway provider

Please suggest me how i can do this

0

Hi Dany,
Where you able to find a solution for this. I am looking for a similar solution.
Regards,
Jessy

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.