Browse Source

Fix issue #1 by changing variable name and converting currency to lowercase before checking

master
Sven Slootweg 9 years ago
parent
commit
81f4ad43c5
  1. 2
      public_html/modules/donate.php
  2. 2
      public_html/modules/payment/paypal.php

2
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);

2
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);

Loading…
Cancel
Save