Skip to content

Commit

Permalink
Enable the credit_on_fail flag to retry refund if void request fails (#4
Browse files Browse the repository at this point in the history
)
  • Loading branch information
sukake authored and mvestil committed Dec 16, 2019
1 parent 431b281 commit 6f00e5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/Message/RefundRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
* @date 3/5/18
* @author markbonnievestil
*/
class RefundRequest extends AbstractRequest
class RefundRequest extends VoidRequest
{
/**
* @return array
Expand All @@ -85,8 +85,6 @@ public function getData()

$this->validate('amount');

$data['request_action'] = 'CCCREDIT';
$data['request_ref_po_id'] = $this->getTransactionReference();
$data['li_value_1'] = $this->getAmount();

return $data;
Expand Down
2 changes: 1 addition & 1 deletion src/Message/VoidRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function getData()

$data['request_action'] = 'CCREVERSE';
$data['request_ref_po_id'] = $this->getTransactionReference();
//$data['credit_on_fail'] = 1;
$data['credit_on_fail'] = 1;

return $data;
}
Expand Down

0 comments on commit 6f00e5b

Please sign in to comment.