我正在尝试通过C#应用程序通过sagePay Guardian测试处理事务。但是,当尝试在TransactionHook实例上运行Process方法时,Guardian报告连接服务器的错误。
在日志文件中查找的第一个错误是:
[Integral.Library.PrClient.PRClientSession.Connect()] Error Code=30000, Error Message=TPRClientSessionKey.SendSessionKey() Failed - Could not load file or assembly 'cryptpp_m.dll' or one of its dependencies. The specified module could not be found.
该dll位于C:\ sagepay \ guardian \ bin文件夹中(其他所有dll也是如此)。当我在64位计算机上运行时,它是64位版本。
sagePay网站上没有错误代码30000的信息。我尝试了半集成和完全集成模式,但没有任何变化。
我什至在我的项目中添加了对cryptpp_m.dll的引用
这是用于发送交易的代码
using Integral.Library.GuardianClient;
namespace sagePay.Guardian
{
public class TransactionManager
{
public bool ProcessSale()
{
bool result = false;
TillInformation tillInformation = new TillInformation();
TransactionInfo transactionInfo = new TransactionInfo();
TransactionHook transaction = new TransactionHook();
TransactionHook.TRANSACTIONHOOK_TRANSACTIONTYPE transactionType;
tillInformation.MerchantName = "Test Shop";
tillInformation.Address1 = "TestAddress 1";
tillInformation.Address2 = "TestAddress 1";
tillInformation.Address3 = "TestAddress 1";
transactionType = TransactionHook.TRANSACTIONHOOK_TRANSACTIONTYPE.INT_TT_SALE;
result = transaction.Process(transactionType, 10000, ref tillInformation, ref transactionInfo);
return result;
}
}
}