Skip to content

Commit

Permalink
Refactoring and fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Aashish committed Oct 10, 2023
1 parent 447b226 commit ca23c33
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions includes/gateway/traits/charge-request-builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ public function build_charge_request(
{
$currency = $order->get_currency();
$return_uri = $this->getRedirectUrl($callback_endpoint, $order_id, $order);
$description = apply_filters(
'omise_charge_params_description',
'WooCommerce Order id ' . $order_id,
$order
);
$description = 'WooCommerce Order id ' . $order_id;

return [
'amount' => Omise_Money::to_subunit($order->get_total(), $currency),
Expand All @@ -38,12 +34,7 @@ public function getMetadata($order_id, $order, $additionalData = [])
// override order_id as a reference for webhook handlers.
$orderId = [ 'order_id' => $order_id ];

echo var_dump(apply_filters('omise_charge_params_metadata', [], $order));

return array_merge(
apply_filters('omise_charge_params_metadata', [], $order),
array_merge($orderId, $additionalData)
);
return array_merge($orderId, $additionalData);
}

/**
Expand Down

0 comments on commit ca23c33

Please sign in to comment.