X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FPayment.php;h=502d332df305b91535b98bb04b91b191ca6d991f;hb=7646662a2002fac1f942d0a590145c38e735891f;hp=1e5f6462231da332699ab5891c477643bbcf96e8;hpb=8124c8d9c3188e921626b57dee7cfca0549beb4a;p=civicrm-core.git diff --git a/CRM/Core/Payment.php b/CRM/Core/Payment.php index 1e5f646223..502d332df3 100644 --- a/CRM/Core/Payment.php +++ b/CRM/Core/Payment.php @@ -261,7 +261,14 @@ abstract class CRM_Core_Payment { } $log = new CRM_Utils_SystemLogger(); - $log->alert($message, $_REQUEST); + // $_REQUEST doesn't handle JSON, to support providers that POST JSON we need the raw POST data. + $rawRequestData = file_get_contents("php://input"); + if (CRM_Utils_JSON::isValidJSON($rawRequestData)) { + $log->alert($message, json_decode($rawRequestData, TRUE)); + } + else { + $log->alert($message, $_REQUEST); + } } /** @@ -581,7 +588,7 @@ abstract class CRM_Core_Payment { * @return string */ public function getPaymentTypeLabel() { - return $this->_paymentProcessor['payment_type'] == 1 ? 'Credit Card' : 'Direct Debit'; + return $this->_paymentProcessor['payment_type'] == 1 ? ts('Credit Card') : ts('Direct Debit'); } /**