Open jonathonbyrdziak opened 8 years ago
StackTrace
$payment->getBaseTotalDue() == $amount,
which will send a TRUE
boolean to The receiving parameter on line 80 public function refund($transactionId, $isPartial = false, $partialAmount = null)
is $isPartial
, but $payment->getBaseTotalDue() == $amount,
will only send TRUE
if it is NOT partial.
I am just looking at the code and haven't tested this yet, but if I'm correct, it could be leading to the problem of refunding 100% of the order when I only wanted to partially refund the order.
I realize that this is related to the HPS Paypal and my original issue did not deal with paypal. I'm going to go look to see if this is the same with standard HPS payments.
XML
I've tested the standard payment direct post to Heartland. The xml that I'm sending over is correct according to your documentation.
<?xml version="1.0"?>
<hps:Transaction>
<hps:CreditReversal>
<hps:Block1>
<hps:Amt>29.50</hps:Amt>
<hps:AuthAmt>12.51</hps:AuthAmt>
<hps:GatewayTxnId>1014062970</hps:GatewayTxnId>
<hps:AdditionalTxnFields>
<hps:Description>Customer IP Address: 127.0.0.1, User Agent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:44.0) Gecko/20100101
Firefox/44.0</hps:Description>
<hps:InvoiceNbr>100002793</hps:InvoiceNbr>
<hps:CustomerID>asdf@asdf.com</hps:CustomerID>
</hps:AdditionalTxnFields>
</hps:Block1>
</hps:CreditReversal>
</hps:Transaction>
Can you look into this and find out if your system is handling the refunds properly?
Found another issue. The last few credit memos we're issued for partial amounts have been refunding the entire order. Here are some examples to check out: