Braintree Exception SSLCaFileNotFound

V magento v1.9.3 popravljam dodatek Braintree, ki sedaj ne deluje. Uspelo mi je priti do malo bolj podrobnega dnevniškega zapisa, ki ga ne znam razvozlati oz. ne vem kje naj se lotim popravkov. Kakšen nasvet?

2017-06-01T12:26:50+00:00 DEBUG (7): ****exception 'Braintree_Exception_SSLCaFileNotFound' in /public_html/lib/Braintree/Configuration.php:233 Stack trace:
#0 /public_html/lib/Braintree/Http.php(86): Braintree_Configuration::caFile()
#1 /public_html/lib/Braintree/Http.php(64): Braintree_Http::_doUrlRequest('POST', 'https://api.bra...', '_authorize(Object(Braintree_Payments_Model_Rewrite_Sales_Order_Payment), 0.01, false)
#8 /public_html/app/code/core/Mage/Sales/Model/Order/Payment.php(1089): Braintree_Payments_Model_Paymentmethod->authorize(Object(Braintree_Payments_Model_Rewrite_Sales_Order_Payment), 0.01)
#9 /public_html/app/code/core/Mage/Sales/Model/Order/Payment.php(342): Mage_Sales_Model_Order_Payment->_authorize(true, 0.01)
#10 /public_html/app/code/core/Mage/Sales/Model/Order.php(896): Mage_Sales_Model_Order_Payment->place()
#11 /public_html/app/code/core/Mage/Sales/Model/Order.php(1114): Mage_Sales_Model_Order->_placePayment()
#12 [internal function]: Mage_Sales_Model_Order->place()
#13 /public_html/app/code/core/Mage/Core/Model/Resource/Transaction.php(105): call_user_func(Array)
#14 /public_html/app/code/core/Mage/Core/Model/Resource/Transaction.php(159): Mage_Core_Model_Resource_Transaction->_runCallbacks()
#15 /public_html/app/code/core/Mage/Sales/Model/Service/Quote.php(189): Mage_Core_Model_Resource_Transaction->save()
#16 /public_html/app/code/core/Mage/Sales/Model/Service/Quote.php(249): Mage_Sales_Model_Service_Quote->submitOrder()
#17 /public_html/app/code/core/Mage/Checkout/Model/Type/Onepage.php(855): Mage_Sales_Model_Service_Quote->submitAll()
#18 /public_html/app/code/core/Mage/Checkout/controllers/OnepageController.php(578): Mage_Checkout_Model_Type_Onepage->saveOrder()
#19 /public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Checkout_OnepageController->saveOrderAction()
#20 /public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('saveOrder')
#21 /public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#22 /public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch() #23 /public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#24 /public_html/index.php(83): Mage::run('', 'store')
#25 {main}

ps.: Certifikat je pravilno nameščen v košarici.

6 odgovorov

Pojdi v /public_html/lib/Braintree/Http.php in najdi vrstico

curlsetopt($curl, CURLOPTSSL_VERIFYPEER, true);

pa jo spremeni v

curlsetopt($curl, CURLOPTSSL_VERIFYPEER, false);

Če ti potem deluje, imaš problem z certifikatom na strežniku. Pa ne mislim tistega ki ga imaš za spletno stran. Če nimaš neke stare distribucije, bi posodobitev sistema morala rešiti problem.

Nič ni boljše. Očitno je nekaj drugega.

Zakomentiraj komplet spodnje vrstice in testiraj. Pobriši cache!

if ($this->config->sslOn()) {
curl
setopt($curl, CURLOPTSSLVERIFYPEER, true);
curlsetopt($curl, CURLOPTSSLVERIFYHOST, 2);
curl
setopt($curl, CURLOPTCAINFO, $this->config->caFile());
}

Je to slučajno starejši PHP ali server?
Načeloma se te zadeve reši z cacert paketom, kjer prenese root certifikate

1

Sem zakomentiral in s svojo Viso sedaj dobim "Merchant account does not support payment instrument. Credit card is not accepted by this merchant account...", kar se mi zdi precej bolje :)
V prihodnji dneh testiram še sandbox in sporočim, kako bo. Ali pa samo počakam kakšno stranko :D

@OvcaX php je v 5.5. Pred kratkim smo menjali design in backend posodobili iz 1.7 na 1.9. Od takrat ne deluje. Stare strani na istem strežniku delujejo normalno.

Tudi v sandbox je ista napaka za različne kartice:
Merchant account does not support payment instrument. Credit card type is not accepted by this merchant account. Credit card number is required. Credit card must include number, paymentmethodnonce, or venmosdkpaymentmethodcode.