2013-07-29 40 views
1

這是這個問題的第二部分https://stackoverflow.com/questions/17922957/authorize-net-works-in-sandbox-but-not-in-production-code我認爲這是同樣的問題,但只是包住它不是我想分開的問題。Authorize.Net CardPresentVoid沒有正確初始化

正如您從生產代碼中的照片中看到的那樣,AuthorizeNet.CardPresentVoid對象無法正確初始化。但是,它在沙盒代碼中。這遠遠超過了我的歲月..任何人都有線索?

這是代碼(減去實際值)

AuthorizeNet.CardPresentVoid cpv = new AuthorizeNet.CardPresentVoid(TransactionID); 
var cpg = new AuthorizeNet.CardPresentGateway(LoginID, TransactionKey, true);  
AuthorizeNet.IGatewayResponse response = cpg.Send(cpv); 

對不起,我的照片,但很明顯,如果你嘗試拍攝畫面在VS的信息在前看不見

Production Code

Sandbox Code

回答

0

問題是我指着不同的DLL版本。在我的沙箱中,我指向1.7.0,並且在生產代碼中我指向1.3.0

當我將生產代碼指向1.7.0 dll時,它工作正常