fix base url
This commit is contained in:
		
							parent
							
								
									9b0043949a
								
							
						
					
					
						commit
						9943a83507
					
				|  | @ -24,9 +24,9 @@ final class Index | |||
| 
 | ||||
|     protected function _client() | ||||
|     { | ||||
| 
 | ||||
|         $client = new Client([ | ||||
|             'headers' => $this->_headers(), | ||||
|             'base_url' => $this->_config['url'], | ||||
|             'headers' => $this->_headers() | ||||
|         ]); | ||||
| 
 | ||||
|         return $client; | ||||
|  | @ -51,6 +51,12 @@ final class Index | |||
|                 $payload['details'][] = (new Detail($item))->jsonSerialize(); | ||||
|             } | ||||
| 
 | ||||
|             $this->_client()->post($this->_config['url'], [ | ||||
|                 'body' => [ | ||||
|                     "magento_2_" . time() => $payload | ||||
|                 ] | ||||
|             ]); | ||||
| 
 | ||||
|             return json_encode($payload); | ||||
|         } else { | ||||
|             throw new \ErrorException('$order is not instance \Magento\Sales\Model\Order\Interceptor'); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue