3045:缺少货币字段

时间:2015-06-16 11:09:49

标签: salesforce sagepay

我在与sagepay test environment的salesforce集成中遇到以下错误。我正在使用'AES128'算法。

This transaction attempt has failed. We are unable to redirect you back to the web store from which you were purchasing. The details of the failure are given below.

Status: MALFORMED

Status Detail:  3045 : The Currency field is missing.

我的源系统是Salesforce。我们使用AES128加密算法。

Blob stringToEncrypt = Blob.valueOf('VendorTxCode=Vtest&Amount=10&Currency=GBP&Description=test description&SuccessURL=https://ap1.salesforce.com/a01&FailureURL=https://ap1.salesforce.com/a01&BillingSurname=Ravi&BillingFirstnames=test ravi&BillingAddress1=BillAddressLine1&BillingCity=Atlanta&BillingPostCode=30004&BillingCountry=US&DeliverySurname=test&DeliveryFirstnames=Fnames&DeliveryAddress1=test&DeliveryCity=Atlanta&DeliveryPostCode=3004&DeliveryCountry=US');

Blob cryptoKey = Blob.valueOf('key');
Blob encryption = Crypto.encrypt('AES128', cryptoKey, cryptoKey, stringToEncrypt);

先谢谢。

1 个答案:

答案 0 :(得分:0)

你检查过padding是PCKS#5吗?当加密错误时,错误3045(货币)是第一个出现....