From 81f4ad43c5ff51156f70aea34905762c0ffa8552 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Mon, 1 Apr 2013 22:29:36 +0200 Subject: [PATCH] Fix issue #1 by changing variable name and converting currency to lowercase before checking --- public_html/modules/donate.php | 2 +- public_html/modules/payment/paypal.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public_html/modules/donate.php b/public_html/modules/donate.php index 15f1a63..52f33c5 100644 --- a/public_html/modules/donate.php +++ b/public_html/modules/donate.php @@ -67,7 +67,7 @@ if(!empty($_POST['submit'])) switch($sPaymentMethod->sType) { case PaymentMethod::PAYPAL: - if($sPaymentRequest->sCurrency == "btc") + if(strtolower($_POST['currency']) == "btc") { $sCurrency = urlencode("USD"); $sAmount = round(Currency::Convert("usd", "btc", $_POST['amount']), 2); diff --git a/public_html/modules/payment/paypal.php b/public_html/modules/payment/paypal.php index ed894ea..8996c5b 100644 --- a/public_html/modules/payment/paypal.php +++ b/public_html/modules/payment/paypal.php @@ -22,7 +22,7 @@ catch (NotFoundException $e) throw new RouterException("No such payment method found."); } -if($sPaymentRequest->sCurrency == "btc") +if(strtolower($sPaymentRequest->sCurrency) == "btc") { $sCurrency = urlencode("USD"); $sAmount = round(Currency::Convert("usd", "btc", $sPaymentRequest->sAmount), 2);