无法与 PayPal 网关通信
Posted
技术标签:
【中文标题】无法与 PayPal 网关通信【英文标题】:Unable to communicate with the PayPal gateway 【发布时间】:2016-01-24 15:00:53 【问题描述】:这是我的网站:http://saffronflavor.com 我用的是magento v1.9.2.1,我把paypal设置好了,沙箱关了,SSl关了,paypal的所有权限都设置好了。 但我仍然收到此错误: 有什么帮助吗?
谢谢
here is the log:
2015-10-25T02:16:09+00:00 ERR (3):
exception 'Exception' with message 'PayPal NVP CURL connection error #7: ' in /home/www/saffronflavor.com/app/code/core/Mage/Paypal/Model/Api/Nvp.php:983
Stack trace:
#0 /home/www/saffronflavor.com/app/code/core/Mage/Paypal/Model/Api/Nvp.php(616): Mage_Paypal_Model_Api_Nvp->call('SetExpressCheck...', Array)
#1 /home/www/saffronflavor.com/app/code/core/Mage/Paypal/Model/Express/Checkout.php(381): Mage_Paypal_Model_Api_Nvp->callSetExpressCheckout()
#2 /home/www/saffronflavor.com/app/code/core/Mage/Paypal/Controller/Express/Abstract.php(108): Mage_Paypal_Model_Express_Checkout->start('http://saffronf...', 'http://saffronf...', true)
#3 /home/www/saffronflavor.com/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Paypal_Controller_Express_Abstract->startAction()
#4 /home/www/saffronflavor.com/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('start')
#5 /home/www/saffronflavor.com/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#6 /home/www/saffronflavor.com/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#7 /home/www/saffronflavor.com/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#8 /home/www/saffronflavor.com/index.php(83): Mage::run('', 'store')
#9 main
-------------------------------
2015-10-25T02:16:09+00:00 DEBUG (7): Array
(
[url] => https://api-3t.paypal.com/nvp
[SetExpressCheckout] => Array
(
[PAYMENTACTION] => Sale
[AMT] => 12.00
[CURRENCYCODE] => USD
[RETURNURL] => http://saffronflavor.com/index.php/paypal/express/return/
[CANCELURL] => http://saffronflavor.com/index.php/paypal/express/cancel/
[INVNUM] => 100000001
[SOLUTIONTYPE] => Mark
[GIROPAYCANCELURL] => http://saffronflavor.com/index.php/paypal/express/cancel/
[GIROPAYSUCCESSURL] => http://saffronflavor.com/index.php/checkout/onepage/success/
[BANKTXNPENDINGURL] => http://saffronflavor.com/index.php/checkout/onepage/success/
[LOCALECODE] => en_US
[ITEMAMT] => 7.00
[TAXAMT] => 0.00
[SHIPPINGAMT] => 5.00
[L_NUMBER0] => 1gpoushali
[L_NAME0] => 1.00 g Poushali Negin Saffron
[L_QTY0] => 1
[L_AMT0] => 7.00
[BUSINESS] => devpills
[NOTETEXT] =>
[EMAIL] => parham(removed)
[FIRSTNAME] => parham
[LASTNAME] => abbasi
[MIDDLENAME] =>
[SALUTATION] =>
[SUFFIX] =>
[COUNTRYCODE] => MY
[STATE] =>
[CITY] => cyberjaya
[STREET] => block 1 floor 8 unit 03A domain bulding cyberjaya selangor
[ZIP] => 54687954
[PHONENUM] => (removed)
[SHIPTOCOUNTRYCODE] => MY
[SHIPTOSTATE] =>
[SHIPTOCITY] => cyberjaya
[SHIPTOSTREET] => block 1 floor 8 unit 03A domain bulding cyberjaya selangor
[SHIPTOZIP] => 54687954
[SHIPTOPHONENUM] => (removed)
[SHIPTOSTREET2] =>
[STREET2] =>
[SHIPTONAME] => parham abbasi
[ADDROVERRIDE] => 1
[METHOD] => SetExpressCheckout
[VERSION] => 72.0
[USER] => ****
[PWD] => ****
[SIGNATURE] => ****
[BUTTONSOURCE] => Magento_Cart_Community
)
[response] => Array
(
)
[__pid] => 31604
)
【问题讨论】:
我对 Magento 了解不多,但在 /home/www/saffronflavor.com/app/code/core/ 中出现消息 'PayPal NVP CURL 连接错误 #7:' 的行 'exception 'Exception' Mage/Paypal/Model/Api/Nvp.php:983' 解释说 Nvp.php 第 983 行有问题。 是的,这个msg的原因是bkz没有paypal的回应,我也放了paypal得到的数组,但是response是null和空 PayPal 是否与发送框一起使用? Sagar,还没有尝试沙盒,我在真正的贝宝上测试,沙盒非常慢,我两周前创建了一个沙盒帐户,我还在等待他们的确认电子邮件!!!,这就是我的原因不适用于沙盒。 我找到了解决方案,这是关于网络托管公司阻止它的传出连接,在与支持人员交谈后,他们允许传出连接到贝宝网站。现在它的工作。 【参考方案1】:我找到了解决方案,这与 Web 托管公司阻止它的传出连接有关,在与支持人员交谈后,他们允许传出连接到贝宝网站。现在它的工作。
【讨论】:
【参考方案2】:要解决此问题,您可以按照以下说明进行操作:
1.禁用 SSL 验证。
您转到 Magento 后端,然后选择器 System-> Configuration-> Payment Methods
并找到 PayPal Express Checkout
您点击“Configure
”按钮,然后展开“Advanced settings
”部分,您将看到需要禁用的“Enable SSL verification
”选项。让我们把它变成“否”。
view more..
【讨论】:
以上是关于无法与 PayPal 网关通信的主要内容,如果未能解决你的问题,请参考以下文章
与 HTTPS 微服务通信时,HTTPS 网关 API 无法验证第一个证书
android studio(java)中的Paypal:与服务器通信的问题