Skip to content

Commit

Permalink
Merge pull request #22 from OXID-eSales/PSPAYPAL-724_BNCodes
Browse files Browse the repository at this point in the history
Provide BN-Codes in showOrderDetails
  • Loading branch information
sosenx authored Aug 30, 2024
2 parents f9e7251 + 1784dee commit 2c18ead
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions generated/Service/Orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,24 @@ public function createOrder(OrderRequest $order, $payPalPartnerAttributionId, $p
* @param $fields string A comma-separated list of fields that should be returned for the order. Valid filter
* field is `payment_source`.
*
* @throws ApiException
* @param $payPalPartnerAttributionId string
*
* @return Order
*@throws ApiException
*/
public function showOrderDetails($id, $fields): Order
public function showOrderDetails($id, $fields, $payPalPartnerAttributionId): Order
{
$path = "/orders/{$id}";

$headers = [];
$headers['Content-Type'] = 'application/json';
$headers['PayPal-Partner-Attribution-Id'] = $payPalPartnerAttributionId;

$params = [];
$params['fields'] = $fields;

$body = null;
$response = $this->send('GET', $path, $params, [], $body);
$response = $this->send('GET', $path, $params, $headers, $body);
$jsonData = json_decode($response->getBody(), true);
return new Order($jsonData);
}
Expand Down

0 comments on commit 2c18ead

Please sign in to comment.