PayPal 的 CallerServices 可在本地主机上运行,但不能在服务器上运行
我的 PayPal Direct 脚本在我的机器上完美运行。 nUnit 测试和通过本地主机上的网站进行测试。然而,第一行代码在我的服务器和另一台服务器上失败。 (两者都完全信任)
CallerServices caller = new CallerServices();
消息:“com.paypal.sdk.core.soap.SOAPAPICaller”的类型初始值设定项引发异常。 来源:paypal_base
堆栈跟踪:
位于 com.paypal.sdk.core.soap.SOAPAPICaller..ctor() 在 com.paypal.sdk.services.CallerServices..ctor() 在 TS.Common.BusinessLogic.PaymentGateways.PayPalProController.CChargeCard(字符串 paymentAmount、订单 CurrentOrder、字符串creditCardType、字符串creditCardNumber、字符串 CVV2、字符串 expMonth、字符串 expYear、PaymentActionCodeType paymentAction、Transaction& 交易) 在 TS.Common.BusinessLogic.PaymentGateways.PayPalProController.ChargeCard(订单 CurrentOrder、小数金额、字符串 CreditCardNum、字符串 ExpMonth、字符串 ExpYear、字符串 SecurityNumber、交易和交易) 在 OrderController.SubmitCreditCardPayment(订单顺序,十进制 ChargeAmount,字符串 CreditCardNum,字符串 ExpMonth,字符串 ExpYear,字符串 Var,字符串 CardType,交易和交易) at OrderController.SubmitOrder(订单订单、交易&交易、Nullable`1 GiftCertId、字符串 CreditCardNum、字符串 ExpMonth、字符串 ExpYear、字符串 Var、字符串 CardType、字符串 Culture) 在 d:\Inetpub\tickets\Checkout.aspx.cs 中的 Checkout.btnOrder_Click(Object sender, EventArgs e) 处:第 488 行
My PayPal Direct script works perfect on my machine. Both nUnit tests and via a website on localhost. However this first line of code fails on my server and another server. (both full trust)
CallerServices caller = new CallerServices();
Message: The type initializer for 'com.paypal.sdk.core.soap.SOAPAPICaller' threw an exception.
Source: paypal_base
Stack Trace:
at com.paypal.sdk.core.soap.SOAPAPICaller..ctor()
at com.paypal.sdk.services.CallerServices..ctor()
at TS.Common.BusinessLogic.PaymentGateways.PayPalProController.CChargeCard(String paymentAmount, Order CurrentOrder, String creditCardType, String creditCardNumber, String CVV2, String expMonth, String expYear, PaymentActionCodeType paymentAction, Transaction& transaction)
at TS.Common.BusinessLogic.PaymentGateways.PayPalProController.ChargeCard(Order CurrentOrder, Decimal Amount, String CreditCardNum, String ExpMonth, String ExpYear, String SecurityNumber, Transaction& transaction)
at OrderController.SubmitCreditCardPayment(Order order, Decimal ChargeAmount, String CreditCardNum, String ExpMonth, String ExpYear, String Var, String CardType, Transaction& transaction)
at OrderController.SubmitOrder(Order order, Transaction& transaction, Nullable`1 GiftCertId, String CreditCardNum, String ExpMonth, String ExpYear, String Var, String CardType, String Culture)
at Checkout.btnOrder_Click(Object sender, EventArgs e) in d:\Inetpub\tickets\Checkout.aspx.cs:line 488
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
添加 log4net.dll ,如果没有将其放入 bin 文件夹中并添加引用。这对我有用...
Add log4net.dll , if not put it in your bin folder and add reference. It works for me...
仅添加对特定版本的 log4net.dll 的引用。会起作用的
Add the reference to the log4net.dll with the specific version only. It will work