62 if(empty($policiesList))
65 if($type == self::TYPE_RETURN)
66 $policyBranch = $policiesList[
"returnPolicyProfileList"][
"ReturnPolicyProfile"];
67 elseif($type == self::TYPE_PAYMENT)
68 $policyBranch = $policiesList[
"paymentProfileList"][
"PaymentProfile"];
69 elseif($type == self::TYPE_SHIPPING)
70 $policyBranch = $policiesList[
"shippingPolicyProfile"][
"ShippingPolicyProfile"];
74 if(empty($policyBranch) || !is_array($policyBranch))
80 foreach($policies as $policy)
83 isset($policy[
"profileName"])
84 && $policy[
"profileName"] <>
''
85 && isset($policy[
"profileId"])
86 && $policy[
"profileId"] <>
''
89 $result[$policy[
"profileId"]] = $policy[
"profileName"];
107 $this->http->setHeader(
"X-EBAY-SOA-CONTENT-TYPE",
"text/xml");
108 $this->http->setHeader(
"X-EBAY-SOA-GLOBAL-ID",
"EBAY-RU");
109 $this->http->setHeader(
"X-EBAY-SOA-SERVICE-NAME",
"SellerProfilesManagementService");
110 $this->http->setHeader(
"X-EBAY-SOA-OPERATION-NAME", $operationName);
111 $this->http->setHeader(
"X-EBAY-SOA-REQUEST-DATA-FORMAT",
"XML");
112 $this->http->setHeader(
"X-EBAY-SOA-RESPONSE-DATA-FORMAT",
"XML");
113 $this->http->setHeader(
"X-EBAY-SOA-SECURITY-TOKEN", $this->authToken);
115 if(mb_strtolower(SITE_CHARSET) !=
'utf-8')
116 $data = Encoding::convertEncodingArray($data, SITE_CHARSET,
'UTF-8');
118 $result = $this->http->post(self::URL, $data);
119 $errors = $this->http->getError();
121 if (!$result && !empty($errors))
125 foreach($errors as $errorCode => $errMes)
126 $strError .= $errorCode.
": ".$errMes;
132 $status = $this->http->getStatus();
137 if(mb_strtolower(SITE_CHARSET) !=
'utf-8')
138 $result = Encoding::convertEncodingArray($result,
'UTF-8', SITE_CHARSET);