Skip to content

Commit

Permalink
fixes in refund endpoint for credit notes
Browse files Browse the repository at this point in the history
  • Loading branch information
mobixon committed Nov 15, 2019
1 parent 6981db6 commit 7ba61ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Api/CreditNotes.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ class CreditNotes extends BaseApi
{
const API_PATH = 'creditnotes';
const API_KEY = 'creditnote';
const API_REFUND_KEY = 'creditnote_refund';

public function refund($creditNoteId, $data)
{
$this->client->post(static::API_PATH.'/'.$creditNoteId.'/refunds', $this->organizationId, $data);
$response = $this->client->post(static::API_PATH.'/'.$creditNoteId.'/refunds', $this->organizationId, $data);

return true;
return $response[static::API_REFUND_KEY];
}
}

0 comments on commit 7ba61ca

Please sign in to comment.