You are here

function _uc_paypal_nvp_to_array in Ubercart 7.3

Same name and namespace in other branches
  1. 5 payment/uc_paypal/uc_paypal.module \_uc_paypal_nvp_to_array()
  2. 6.2 payment/uc_paypal/uc_paypal.module \_uc_paypal_nvp_to_array()

Turns PayPal's NVP response to an API call into an associative array.

1 call to _uc_paypal_nvp_to_array()
uc_paypal_api_request in payment/uc_paypal/uc_paypal.module
Sends a request to PayPal and returns a response array.

File

payment/uc_paypal/uc_paypal.module, line 1050
Integrates various PayPal payment services and Instant Payment Notifications (IPN) with Ubercart!

Code

function _uc_paypal_nvp_to_array($nvpstr) {
  foreach (explode('&', $nvpstr) as $nvp) {
    list($key, $value) = explode('=', $nvp);
    $nvp_array[urldecode($key)] = urldecode($value);
  }
  return $nvp_array;
}