Skip to content

Commit

Permalink
added comment lines
Browse files Browse the repository at this point in the history
  • Loading branch information
0xBeycan committed Mar 2, 2024
1 parent ef73881 commit f551dba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion classes/lite/MeprCryptoPayLiteGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ private function mepr_invoice_header($txn): void
{
$order_bumps = [];
try {
$orderBumpProductIds = isset($_GET['obs']) && is_array($_GET['obs']) ? array_map('intval', $_GET['obs']) : [];
// obs parameter clearing with absint method with array_map
$orderBumpProductIds = isset($_GET['obs']) && is_array($_GET['obs']) ? array_map('absint', $_GET['obs']) : [];
$orderBumpProducts = MeprCheckoutCtrl::get_order_bump_products($txn->product_id, $orderBumpProductIds);

foreach ($orderBumpProducts as $product) {
Expand Down
4 changes: 2 additions & 2 deletions classes/pro/MeprCryptoPayGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ private function mepr_invoice_header($txn): void
{
$order_bumps = [];
try {
$orderBumpProductIds = isset($_GET['obs']) && is_array($_GET['obs']) ? array_map('intval', $_GET['obs']) : [];
// obs parameter clearing with absint method with array_map
$orderBumpProductIds = isset($_GET['obs']) && is_array($_GET['obs']) ? array_map('absint', $_GET['obs']) : [];
$orderBumpProducts = MeprCheckoutCtrl::get_order_bump_products($txn->product_id, $orderBumpProductIds);

foreach ($orderBumpProducts as $product) {
Expand Down Expand Up @@ -352,7 +353,6 @@ public function display_update_account_form($subscription_id, $errors = array(),

$txn->user_id = $usr->ID;
$txn->product_id = sanitize_key($prd->ID);
// $txn->set_subtotal($_POST['amount']); //Don't do this, it doesn't work right on existing txns
$txn->amount = MeprUtils::format_currency_us_float($sub->price);
$txn->tax_amount = MeprUtils::format_currency_us_float($sub->tax_amount);
$txn->total = $txn->amount + $txn->tax_amount;
Expand Down

0 comments on commit f551dba

Please sign in to comment.