@@ -7,21 +7,21 @@ discard block |
||
| 7 | 7 | class Atdconnect |
| 8 | 8 | { |
| 9 | 9 | |
| 10 | - public static $wsshead; |
|
| 11 | - private static $statuswsdl = 'https://testws.atdconnect.com/ws/3_4/orderStatus.wsdl'; |
|
| 12 | - private static $brandwsdl = 'https://testws.atdconnect.com/ws/3_4/brandstyles.wsdl'; |
|
| 13 | - private static $locationwsdl = 'https://testws.atdconnect.com/ws/3_4/locations.wsdl'; |
|
| 14 | - private static $productwsdl = 'https://testws.atdconnect.com/ws/3_4/products.wsdl'; |
|
| 15 | - private static $orderwsdl = 'https://testws.atdconnect.com/ws/3_4/orders.wsdl'; |
|
| 10 | + public static $wsshead; |
|
| 11 | + private static $statuswsdl = 'https://testws.atdconnect.com/ws/3_4/orderStatus.wsdl'; |
|
| 12 | + private static $brandwsdl = 'https://testws.atdconnect.com/ws/3_4/brandstyles.wsdl'; |
|
| 13 | + private static $locationwsdl = 'https://testws.atdconnect.com/ws/3_4/locations.wsdl'; |
|
| 14 | + private static $productwsdl = 'https://testws.atdconnect.com/ws/3_4/products.wsdl'; |
|
| 15 | + private static $orderwsdl = 'https://testws.atdconnect.com/ws/3_4/orders.wsdl'; |
|
| 16 | 16 | |
| 17 | 17 | |
| 18 | - public function __construct($user, $pass, $client) |
|
| 19 | - { |
|
| 18 | + public function __construct($user, $pass, $client) |
|
| 19 | + { |
|
| 20 | 20 | self::$wsshead = $this->getWSSHeader($user, $pass, $client); |
| 21 | - } |
|
| 21 | + } |
|
| 22 | 22 | |
| 23 | - public static function getWSSHeader($user, $pass, $client) |
|
| 24 | - { |
|
| 23 | + public static function getWSSHeader($user, $pass, $client) |
|
| 24 | + { |
|
| 25 | 25 | $xml = ' |
| 26 | 26 | <wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> |
| 27 | 27 | <wsse:UsernameToken atd:clientId="' . $client . '" xmlns:atd="http://api.atdconnect.com/atd"> |
@@ -32,157 +32,157 @@ discard block |
||
| 32 | 32 | '; |
| 33 | 33 | |
| 34 | 34 | 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); |
| 35 | - } |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | 37 | |
| 38 | 38 | |
| 39 | - //************************************************ |
|
| 40 | - // Location Service |
|
| 41 | - //************************************************ |
|
| 39 | + //************************************************ |
|
| 40 | + // Location Service |
|
| 41 | + //************************************************ |
|
| 42 | 42 | |
| 43 | - public static function getLocationByCriteria() |
|
| 44 | - { |
|
| 43 | + public static function getLocationByCriteria() |
|
| 44 | + { |
|
| 45 | 45 | |
| 46 | 46 | $client = new \SoapClient(self::$locationwsdl); |
| 47 | 47 | $client->__setSoapHeaders(self::$wsshead); |
| 48 | 48 | $response = $client->getLocationByCriteria(); |
| 49 | 49 | |
| 50 | 50 | return $response; |
| 51 | - } |
|
| 51 | + } |
|
| 52 | 52 | |
| 53 | - public static function getLocationCutoffTimes($location = '1213421') |
|
| 54 | - { |
|
| 53 | + public static function getLocationCutoffTimes($location = '1213421') |
|
| 54 | + { |
|
| 55 | 55 | |
| 56 | 56 | $client = new \SoapClient(self::$locationwsdl); |
| 57 | 57 | $client->__setSoapHeaders(self::$wsshead); |
| 58 | 58 | $response = $client->getLocationCutoffTimes(array( |
| 59 | - 'location' => $location |
|
| 59 | + 'location' => $location |
|
| 60 | 60 | )); |
| 61 | 61 | |
| 62 | 62 | return $response; |
| 63 | - } |
|
| 63 | + } |
|
| 64 | 64 | |
| 65 | - public static function getDistributionCenter($dc = '059') |
|
| 66 | - { |
|
| 65 | + public static function getDistributionCenter($dc = '059') |
|
| 66 | + { |
|
| 67 | 67 | $client = new \SoapClient(self::$locationwsdl); |
| 68 | 68 | $client->__setSoapHeaders(self::$wsshead); |
| 69 | 69 | $response = $client->getDistributionCenter(array( |
| 70 | - 'servicingDC' => $dc |
|
| 70 | + 'servicingDC' => $dc |
|
| 71 | 71 | )); |
| 72 | 72 | |
| 73 | 73 | return $response; |
| 74 | - } |
|
| 74 | + } |
|
| 75 | 75 | |
| 76 | - //************************************************ |
|
| 77 | - // Brand Styles Service |
|
| 78 | - //************************************************ |
|
| 76 | + //************************************************ |
|
| 77 | + // Brand Styles Service |
|
| 78 | + //************************************************ |
|
| 79 | 79 | |
| 80 | 80 | |
| 81 | - public static function getBrand($location, $product = null) |
|
| 82 | - { |
|
| 81 | + public static function getBrand($location, $product = null) |
|
| 82 | + { |
|
| 83 | 83 | $client = new \SoapClient(self::$brandwsdl); |
| 84 | 84 | $client->__setSoapHeaders(self::$wsshead); |
| 85 | 85 | $response = $client->getBrand(array( |
| 86 | - 'locationNumber' => $location, |
|
| 87 | - 'productGroup' => $product |
|
| 86 | + 'locationNumber' => $location, |
|
| 87 | + 'productGroup' => $product |
|
| 88 | 88 | )); |
| 89 | 89 | |
| 90 | 90 | return $response; |
| 91 | - } |
|
| 91 | + } |
|
| 92 | 92 | |
| 93 | - public static function getStyle($location, $brand = null) |
|
| 94 | - { |
|
| 93 | + public static function getStyle($location, $brand = null) |
|
| 94 | + { |
|
| 95 | 95 | $client = new \SoapClient(self::$brandwsdl); |
| 96 | 96 | $client->__setSoapHeaders(self::$wsshead); |
| 97 | 97 | $response = $client->getBrand(array( |
| 98 | - 'locationNumber' => $location, |
|
| 99 | - 'brand' => $brand |
|
| 98 | + 'locationNumber' => $location, |
|
| 99 | + 'brand' => $brand |
|
| 100 | 100 | )); |
| 101 | 101 | |
| 102 | 102 | return $response; |
| 103 | - } |
|
| 103 | + } |
|
| 104 | 104 | |
| 105 | 105 | |
| 106 | - //************************************************ |
|
| 107 | - // Products Service |
|
| 108 | - //************************************************ |
|
| 106 | + //************************************************ |
|
| 107 | + // Products Service |
|
| 108 | + //************************************************ |
|
| 109 | 109 | |
| 110 | 110 | |
| 111 | 111 | |
| 112 | 112 | |
| 113 | - public static function getProdBrand($location, $product = null) |
|
| 114 | - { |
|
| 113 | + public static function getProdBrand($location, $product = null) |
|
| 114 | + { |
|
| 115 | 115 | $client = new \SoapClient(self::$productwsdl); |
| 116 | 116 | $client->__setSoapHeaders(self::$wsshead); |
| 117 | 117 | $response = $client->getBrand(array( |
| 118 | - 'locationNumber' => $location, |
|
| 119 | - 'productGroup' => $product |
|
| 118 | + 'locationNumber' => $location, |
|
| 119 | + 'productGroup' => $product |
|
| 120 | 120 | )); |
| 121 | 121 | |
| 122 | 122 | return $response; |
| 123 | - } |
|
| 123 | + } |
|
| 124 | 124 | |
| 125 | - public static function getProductByCriteria($search) |
|
| 126 | - { |
|
| 125 | + public static function getProductByCriteria($search) |
|
| 126 | + { |
|
| 127 | 127 | $client = new \SoapClient(self::$productwsdl); |
| 128 | 128 | $client->__setSoapHeaders(self::$wsshead); |
| 129 | 129 | $response = $client->getProductByCriteria($search); |
| 130 | 130 | |
| 131 | 131 | return $response; |
| 132 | - } |
|
| 132 | + } |
|
| 133 | 133 | |
| 134 | - public static function getProductByKeyword($search) |
|
| 135 | - { |
|
| 134 | + public static function getProductByKeyword($search) |
|
| 135 | + { |
|
| 136 | 136 | $client = new \SoapClient(self::$productwsdl); |
| 137 | 137 | $client->__setSoapHeaders(self::$wsshead); |
| 138 | 138 | $response = $client->getProductByKeyword($search); |
| 139 | 139 | |
| 140 | 140 | return $response; |
| 141 | - } |
|
| 141 | + } |
|
| 142 | 142 | |
| 143 | - //************************************************ |
|
| 144 | - // Order Service |
|
| 145 | - //************************************************ |
|
| 143 | + //************************************************ |
|
| 144 | + // Order Service |
|
| 145 | + //************************************************ |
|
| 146 | 146 | |
| 147 | - public static function placeOrder($order) |
|
| 148 | - { |
|
| 149 | - $client = new \SoapClient(self::$orderwsdl); |
|
| 150 | - $client->__setSoapHeaders(self::$wsshead); |
|
| 151 | - $response = $client->placeOrder($order); |
|
| 147 | + public static function placeOrder($order) |
|
| 148 | + { |
|
| 149 | + $client = new \SoapClient(self::$orderwsdl); |
|
| 150 | + $client->__setSoapHeaders(self::$wsshead); |
|
| 151 | + $response = $client->placeOrder($order); |
|
| 152 | 152 | |
| 153 | - return $response; |
|
| 154 | - } |
|
| 155 | - |
|
| 156 | - public static function previewOrder($order) |
|
| 157 | - { |
|
| 158 | - $client = new \SoapClient(self::$orderwsdl); |
|
| 159 | - $client->__setSoapHeaders(self::$wsshead); |
|
| 160 | - $response = $client->previewOrder($order); |
|
| 153 | + return $response; |
|
| 154 | + } |
|
| 155 | + |
|
| 156 | + public static function previewOrder($order) |
|
| 157 | + { |
|
| 158 | + $client = new \SoapClient(self::$orderwsdl); |
|
| 159 | + $client->__setSoapHeaders(self::$wsshead); |
|
| 160 | + $response = $client->previewOrder($order); |
|
| 161 | 161 | |
| 162 | - return $response; |
|
| 163 | - } |
|
| 164 | - |
|
| 165 | - //************************************************ |
|
| 166 | - // Order Status Service |
|
| 167 | - //************************************************ |
|
| 168 | - |
|
| 169 | - public static function getOrderDetail($status) |
|
| 170 | - { |
|
| 171 | - $client = new \SoapClient(self::$statuswsdl); |
|
| 172 | - $client->__setSoapHeaders(self::$wsshead); |
|
| 173 | - $response = $client->getOrderDetail($status); |
|
| 162 | + return $response; |
|
| 163 | + } |
|
| 164 | + |
|
| 165 | + //************************************************ |
|
| 166 | + // Order Status Service |
|
| 167 | + //************************************************ |
|
| 168 | + |
|
| 169 | + public static function getOrderDetail($status) |
|
| 170 | + { |
|
| 171 | + $client = new \SoapClient(self::$statuswsdl); |
|
| 172 | + $client->__setSoapHeaders(self::$wsshead); |
|
| 173 | + $response = $client->getOrderDetail($status); |
|
| 174 | 174 | |
| 175 | - return $response; |
|
| 176 | - } |
|
| 177 | - |
|
| 178 | - public static function getOrderStatusByCriteria($criteria) |
|
| 179 | - { |
|
| 180 | - $client = new \SoapClient(self::$statuswsdl); |
|
| 181 | - $client->__setSoapHeaders(self::$wsshead); |
|
| 182 | - $response = $client->getOrderStatusByCriteria($criteria); |
|
| 175 | + return $response; |
|
| 176 | + } |
|
| 177 | + |
|
| 178 | + public static function getOrderStatusByCriteria($criteria) |
|
| 179 | + { |
|
| 180 | + $client = new \SoapClient(self::$statuswsdl); |
|
| 181 | + $client->__setSoapHeaders(self::$wsshead); |
|
| 182 | + $response = $client->getOrderStatusByCriteria($criteria); |
|
| 183 | 183 | |
| 184 | - return $response; |
|
| 185 | - } |
|
| 184 | + return $response; |
|
| 185 | + } |
|
| 186 | 186 | |
| 187 | 187 | |
| 188 | 188 | |