@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | private static $brandwsdl = 'https://testws.atdconnect.com/ws/3_4/brandstyles.wsdl'; |
14 | 14 | private static $locationwsdl = 'https://testws.atdconnect.com/ws/3_4/locations.wsdl'; |
15 | 15 | private static $productwsdl = 'https://testws.atdconnect.com/ws/3_4/products.wsdl'; |
16 | - private static $orderwsdl = 'https://testws.atdconnect.com/ws/3_4/orders.wsdl'; |
|
16 | + private static $orderwsdl = 'https://testws.atdconnect.com/ws/3_4/orders.wsdl'; |
|
17 | 17 | |
18 | 18 | protected static $location; |
19 | 19 | |
@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | { |
31 | 31 | $xml = ' |
32 | 32 | <wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> |
33 | - <wsse:UsernameToken atd:clientId="' . $client . '" xmlns:atd="http://api.atdconnect.com/atd"> |
|
34 | - <wsse:Username>' . $user . '</wsse:Username> |
|
35 | - <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">' . $pass . '</wsse:Password> |
|
33 | + <wsse:UsernameToken atd:clientId="' . $client.'" xmlns:atd="http://api.atdconnect.com/atd"> |
|
34 | + <wsse:Username>' . $user.'</wsse:Username> |
|
35 | + <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">' . $pass.'</wsse:Password> |
|
36 | 36 | </wsse:UsernameToken> |
37 | 37 | </wsse:Security> |
38 | 38 | '; |
@@ -40,11 +40,11 @@ discard block |
||
40 | 40 | return new \SoapHeader('http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', 'Security', new \SoapVar($xml, XSD_ANYXML), true); |
41 | 41 | } |
42 | 42 | |
43 | - public static function apiCall($call,$query,$service) |
|
43 | + public static function apiCall($call, $query, $service) |
|
44 | 44 | { |
45 | - $client = new \SoapClient($service); |
|
45 | + $client = new \SoapClient($service); |
|
46 | 46 | $client->__setSoapHeaders(self::$wsshead); |
47 | - $response = $client->$call($query); |
|
47 | + $response = $client->$call($query); |
|
48 | 48 | return $response; |
49 | 49 | } |
50 | 50 | |
@@ -85,17 +85,17 @@ discard block |
||
85 | 85 | |
86 | 86 | public static function getLocationByCriteria() |
87 | 87 | { |
88 | - return self::apiCall('getLocationByCriteria','',self::$locationwsdl); |
|
88 | + return self::apiCall('getLocationByCriteria', '', self::$locationwsdl); |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | public static function getLocationCutoffTimes() |
92 | 92 | { |
93 | - return self::apiCall('getLocationCutoffTimes',['location' => self::$location],self::$locationwsdl); |
|
93 | + return self::apiCall('getLocationCutoffTimes', ['location' => self::$location], self::$locationwsdl); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | public static function getDistributionCenter($dc = '059') |
97 | 97 | { |
98 | - return self::apiCall('getDistributionCenter',array('servicingDC' => $dc),self::$locationwsdl); |
|
98 | + return self::apiCall('getDistributionCenter', array('servicingDC' => $dc), self::$locationwsdl); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | |
@@ -106,12 +106,12 @@ discard block |
||
106 | 106 | |
107 | 107 | public static function getBrand($product = null) |
108 | 108 | { |
109 | - return self::apiCall('getBrand',array('locationNumber' => static::$location,'productGroup' => $product),self::$brandwsdl); |
|
109 | + return self::apiCall('getBrand', array('locationNumber' => static::$location, 'productGroup' => $product), self::$brandwsdl); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | public static function getStyle($brand = null) |
113 | 113 | { |
114 | - return self::apiCall('getStyle',array('locationNumber' => static::$location,'brand' => $brand),self::$brandwsdl); |
|
114 | + return self::apiCall('getStyle', array('locationNumber' => static::$location, 'brand' => $brand), self::$brandwsdl); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | |
@@ -124,17 +124,17 @@ discard block |
||
124 | 124 | |
125 | 125 | public static function getProdBrand($product = null) |
126 | 126 | { |
127 | - return self::apiCall('getProdBrand',array('locationNumber' => static::$location,'productGroup' => $product),self::$productwsdl); |
|
127 | + return self::apiCall('getProdBrand', array('locationNumber' => static::$location, 'productGroup' => $product), self::$productwsdl); |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | public static function getProductByCriteria($search) |
131 | 131 | { |
132 | - return self::apiCall('getProductByCriteria',$search,self::$productwsdl); |
|
132 | + return self::apiCall('getProductByCriteria', $search, self::$productwsdl); |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | public static function getProductByKeyword($search) |
136 | 136 | { |
137 | - return self::apiCall('getProductByKeyword',$search,self::$productwsdl); |
|
137 | + return self::apiCall('getProductByKeyword', $search, self::$productwsdl); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | //************************************************ |
@@ -143,12 +143,12 @@ discard block |
||
143 | 143 | |
144 | 144 | public static function placeOrder($order) |
145 | 145 | { |
146 | - return self::apiCall('placeOrder',$order,self::$orderwsdl); |
|
146 | + return self::apiCall('placeOrder', $order, self::$orderwsdl); |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | public static function previewOrder($order) |
150 | 150 | { |
151 | - return self::apiCall('previewOrder',$order,self::$orderwsdl); |
|
151 | + return self::apiCall('previewOrder', $order, self::$orderwsdl); |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | //************************************************ |
@@ -157,12 +157,12 @@ discard block |
||
157 | 157 | |
158 | 158 | public static function getOrderDetail($status) |
159 | 159 | { |
160 | - return self::apiCall('getOrderDetail',$status,self::$statuswsdl); |
|
160 | + return self::apiCall('getOrderDetail', $status, self::$statuswsdl); |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | public static function getOrderStatusByCriteria($criteria) |
164 | 164 | { |
165 | - return self::apiCall('getOrderStatusByCriteria',$status,self::$statuswsdl); |
|
165 | + return self::apiCall('getOrderStatusByCriteria', $status, self::$statuswsdl); |
|
166 | 166 | } |
167 | 167 | |
168 | 168 |