Skip to content

Commit

Permalink
Merge pull request #72 from angelleye/PFWMA-186
Browse files Browse the repository at this point in the history
Add Cart Fee compatibility, PFWMA-186
  • Loading branch information
kcppdevelopers authored Oct 13, 2020
2 parents 0ae8374 + ccae404 commit a72fae4
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1222,6 +1222,19 @@ public function angelleye_modified_ec_parallel_parameter($request, $gateways, $o
}
}
}
WC()->cart->calculate_fees();
foreach (WC()->cart->get_fees() as $cart_item_key => $fee_values) {
$fee_item = array(
'name' => html_entity_decode(wc_trim_string($fee_values->name ? $fee_values->name : __('Fee', 'paypal-for-woocommerce'), 127), ENT_NOQUOTES, 'UTF-8'),
'desc' => '',
'qty' => 1,
'amt' => AngellEYE_Gateway_Paypal::number_format($fee_values->amount),
'number' => ''
);
$default_new_payments_line_item[] = $fee_item;
$default_item_total += $fee_values->amount;
$default_final_total += $fee_values->amount;
}
if ($default_final_total > 0) {
if (empty($default_pal_id)) {
$map_item_with_account_array['multi_account_id'] = 'default';
Expand Down

0 comments on commit a72fae4

Please sign in to comment.