hi,Thank you for your time,

Posts: 9
Joined: 05/09/2008

hi,
Thank you for your time, Ryan, but we really need your help. I've found that other users have encountered with such problems too. http://www.ubercart.org/forum/general_discussion/2473/paypal_pro_payment..., but I've checked my site's log, found nothing useful.

To get closer, I've dumped the $data and $response in this function uc_paypal_api_request in my staging server, and I've got null response, I think this is the most basic returned data from paypal, is there anything wrong with paypal, or I should check my curl or other settings(i.e, open some port, or ssl supported) in my server?

These are the code:
// Sends a request to PayPal and returns a response array.
function uc_paypal_api_request($request, $server) {
$request['USER'] = variable_get('uc_paypal_api_username', '');
$request['PWD'] = variable_get('uc_paypal_api_password', '');
$request['VERSION'] = '3.0';
$request['SIGNATURE'] = variable_get('uc_paypal_api_signature', '');

$data = '';
foreach ($request as $key => $value) {
$data .= $key .'='. urlencode(ereg_replace(',', '', $value)) .'&';
}
$data = substr($data, 0, -1);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $server);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_NOPROGRESS, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,0);
$response = curl_exec($ch);
if ($error = curl_error($ch)) {
watchdog('uc_paypal', $error, WATCHDOG_ERROR);
}
curl_close($ch);
drupal_set_message("data:".print_r($data, true));
drupal_set_message("response:".print_r($response, true));
return _uc_paypal_nvp_to_array($response);
}
--------------------------------------------------------------------------------------------
This is the dumped $data and $response
data:
METHOD=DoDirectPayment&PAYMENTACTION=Sale&IPADDRESS=123.112.114.0&AMT=13.00&CREDITCARDTYPE=Visa&ACCT=----------------&EXPDATE=------&CVV2=---&FIRSTNAME=jessimy&LASTNAME=young&STREET=shangdi&STREET2=&CITY=beijing&STATE=AL&ZIP=100025&COUNTRYCODE=US&CURRENCYCODE=USD&DESC=1x+staging_88api_notprocess_13usd&INVNUM=26-1210746114&BUTTONSOURCE=Ubercart_ShoppingCart_DP_US&NOTIFYURL=http%3A%2F%2Fdev.aclevercartel.com%2Fhorsemanshipjournal%2Fuc_paypal%2Fipn%2F26&EMAIL=yang%40dfsa.com.cn&PHONENUM=&USER=ruyang_1209890988_biz_api1.ethos.com.cn&PWD=1209890996&VERSION=3.0&SIGNATURE=ANHhHe6zEZ2o.U4fMfWm9.Jsl73FAKWDy.rp5B7sCWPI0THtOtP4iS9l
response:
---------------------------------------------------------------------------------------------
This is our curl settings
cURL support enabled
cURL Information libcurl/7.12.1 OpenSSL/0.9.7a zlib/1.2.1.2 libidn/0.5.6

error when process card using paypal wpp gateway By: yangru (7 replies) Fri, 05/09/2008 - 02:40