Commit 2747ce35 authored by git's avatar git Committed by rbrownell

Issue #3063729 by embeau, rbrownell: Error bad character content for element 'amount'

parent aaaf20df
......@@ -110,7 +110,7 @@ class Onsite extends OnsitePaymentGatewayBase implements OnsiteInterface {
$this->assertPaymentMethod($payment_method);
$amount = $payment->getAmount();
$number = $amount->getNumber();
$number = number_format($amount->getNumber(), 2);
$payment_method_token = $payment_method->getRemoteId();
$moneris_order_id = $payment->getOrderId() . '-' . $payment->uuid() . '-' . date("dmy-G:i:s");
......@@ -151,7 +151,7 @@ class Onsite extends OnsitePaymentGatewayBase implements OnsiteInterface {
$this->assertPaymentState($payment, ['authorization']);
// If not specified, capture the entire amount.
$amount = $amount ?: $payment->getAmount();
$number = $amount->getNumber();
$number = number_format($amount->getNumber(), 2);
$remote_id = explode('|', $payment->getRemoteId());
......@@ -235,7 +235,7 @@ class Onsite extends OnsitePaymentGatewayBase implements OnsiteInterface {
// Validate the requested amount.
$this->assertRefundAmount($payment, $amount);
$number = $amount->getNumber();
$number = number_format($amount->getNumber(), 2);
$remote_id = explode('|', $payment->getRemoteId());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment