Unverified Commit 214d867f authored by sluc23's avatar sluc23 Committed by GitHub
Browse files

Merge pull request #41 from ixiam/rubofvil-patch-1

Fix error setting decimal amounts
parents 53b0171c d3dd6dca
......@@ -225,7 +225,7 @@ class CRM_Core_Payment_Redsys extends CRM_Core_Payment {
}
$miObj = new RedsysAPI();
$miObj->setParameter("Ds_Merchant_Amount", $params["amount"] * 100);
$miObj->setParameter("Ds_Merchant_Amount", (int)(round($params["amount"] * 100)));
$miObj->setParameter("Ds_Merchant_Order", strval(self::formatAmount($params["contributionID"], 12)));
$miObj->setParameter("Ds_Merchant_MerchantCode", $this->_paymentProcessor["user_name"]);
$miObj->setParameter("Ds_Merchant_Currency", self::REDSYS_CURRENCY_EURO);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment