You are here

function uc_ups_access_request in Ubercart 5

Same name and namespace in other branches
  1. 8.4 shipping/uc_ups/uc_ups.module \uc_ups_access_request()
  2. 6.2 shipping/uc_ups/uc_ups.module \uc_ups_access_request()
  3. 7.3 shipping/uc_ups/uc_ups.module \uc_ups_access_request()

Return XML access request to be prepended to all requests to the UPS webservice.

4 calls to uc_ups_access_request()
uc_ups_request_pickup in shipping/uc_ups/uc_ups.module
Construct an XML label and pickup request.
uc_ups_shipment_request in shipping/uc_ups/uc_ups.module
Construct an XML shippment request.
uc_ups_shipping_quote in shipping/uc_ups/uc_ups.module
Construct an XML quote request.
uc_ups_void_shipment_request in shipping/uc_ups/uc_ups.module

File

shipping/uc_ups/uc_ups.module, line 383
Shipping quote module that interfaces with www.ups.com to get rates for small package shipments.

Code

function uc_ups_access_request() {
  $access = variable_get('uc_ups_access_license', '');
  $user = variable_get('uc_ups_user_id', '');
  $password = variable_get('uc_ups_password', '');
  return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<AccessRequest xml:lang=\"en-US\">\n  <AccessLicenseNumber>{$access}</AccessLicenseNumber>\n  <UserId>{$user}</UserId>\n  <Password>{$password}</Password>\n</AccessRequest>\n";
}