I own a website selling greeting cards. I had programmers help me build the site, but upon testing, I realised that the PayPal checkout link still points to PayPal sandbox instead of the real PayPal. I'm quite technologically challenged so after reading the technical documentation on PayPal website and looking at the scripts on my website, I tried to change the scripts but it was in vain.
I did a search for "sandbox" in my site files and found a file named uc_paypal.pages.inc
, the only file with any reference to PayPal sandbox. In the file, there are 3 references to PayPal sandbox. First:
if (variable_get('uc_paypal_wpp_server', '') == 'https://api-3t.paypal.com/nvp') {
$host = 'https://www.paypal.com/cgi-bin/webscr';
}
else {
$host = variable_get('uc_paypal_wps_server', 'https://www.sandbox.paypal.com/cgi-bin/webscr');
}
Second:
$nvp_response = uc_paypal_api_request($nvp_request, variable_get('uc_paypal_wpp_server', 'https://api-3t.sandbox.paypal.com/nvp'));
Third:
if ($_SESSION['have_details'][$order->order_id] !== TRUE) {
$nvp_request = array(
'METHOD' => 'G开发者_如何转开发etExpressCheckoutDetails',
'TOKEN' => $_SESSION['TOKEN'],
);
$nvp_response = uc_paypal_api_request($nvp_request, variable_get('uc_paypal_wpp_server', 'https://api-3t.sandbox.paypal.com/nvp'));
$_SESSION['PAYERID'] = $nvp_response['PAYERID'];
$shipname = check_plain($nvp_response['SHIPTONAME']);
if (strpos($shipname, ' ') > 0) {
$order->delivery_first_name = substr($shipname, 0, strrpos(trim($shipname), ' '));
$order->delivery_last_name = substr($shipname, strrpos(trim($shipname), ' ') + 1);
}
else {
$order->delivery_first_name = $shipname;
$order->delivery_last_name = '';
}
I tried changing removing .sandbox
so that it points to just .paypal.com
but after uploading the amended file to the server, there seems to be no change (checkouts still redirected to .sandbox.paypal
.
Have I changed the correct parameters? Should I be installing something after changing the script and how do I do that? Is there a MySQL entry that needs to be changed?
I read from paypal that there's API certificate or signature that I should be using; where do I put that on the website? What about IPN?
Looks like you are using Ubercart. The way to change the payment settings is to head over to:
http://YOURSITE/admin/store/settings/payment/edit/methods
and under the PayPal Website Payments Standard settings
change the Paypal Server: to "Live"
Also, you should change the code files back to what they were before.
精彩评论