You are here

function commerce_paypal_wps_server_url in Commerce PayPal 7

Same name and namespace in other branches
  1. 7.2 modules/wps/commerce_paypal_wps.module \commerce_paypal_wps_server_url()

Returns the URL to the specified PayPal WPS server.

Parameters

$server: Either sandbox or live indicating which server to get the URL for.

Return value

The URL to use to submit requests to the PayPal WPS server.

1 call to commerce_paypal_wps_server_url()
commerce_paypal_wps_order_form in modules/wps/commerce_paypal_wps.module
Builds a Website Payments Standard form from an order object.

File

modules/wps/commerce_paypal_wps.module, line 461
Implements PayPal Website Payments Standard in Drupal Commerce checkout.

Code

function commerce_paypal_wps_server_url($server) {
  switch ($server) {
    case 'sandbox':
      return 'https://www.sandbox.paypal.com/cgi-bin/webscr';
    case 'live':
      return 'https://www.paypal.com/cgi-bin/webscr';
  }
}