2014-05-12 41 views
0

我使用.net payflow sdk(Payfolow_dotNET.dll)。我的代碼允許客戶使用EC,但PayPal審查頁面不顯示項目詳細信息。它只是說,「你可以看到您的訂單詳細信息在付款前」在Express Checkout評論頁面顯示行項目

UserInfo creds = new UserInfo(user, vendor, partner, pwd); 
string url = ""; 
if (paypalObj.Testing) { 
    url = ConfigurationManager.AppSettings.Get("PayflowTest"); 
} else { 
    url = ConfigurationManager.AppSettings.Get("PayflowLive"); 
} 
PayflowConnectionData connection = new PayflowConnectionData(url); 
Invoice inv = new Invoice(); 
inv.Amt = new Currency(1.01, "USD"); 
inv.OrderDesc = "test item"; 
inv.Comment1 = "test item"; 
// so far this next bit is not helping 
LineItem item = new LineItem(); 
item.Amt = new Currency(1.01, "USD"); 
item.Desc = "test item"; 
item.Qty = 1; 
item.Type = "DIGITAL"; 
item.Name = "test item"; 
item.ItemNumber = "1"; 
inv.AddLineItem(item); 
ECSetRequest setRequest = new ECSetRequest(websiteBase + "Donate/PayPalConfirmPayment", websiteBase + "Donate/Donate"); 
setRequest.PaymentType = "instantonly"; 
setRequest.NoShipping = "1"; 
//setRequest.AddrOverride = "1"; 
PayPalTender tender = new PayPalTender(setRequest); 
SaleTransaction trans = new SaleTransaction(creds, connection, inv, tender, PayflowUtility.RequestId); 
Response resp = trans.SubmitTransaction(); 
TransactionResponse transResp = resp.TransactionResponse; 

如何讓查看頁面上的項目細節有什麼想法? THX

回答

1

原來我錯過了一個屬性 - 物品成本。

item.Cost = new Currency(1.01, "USD"); 

這是一點點奇怪的是,其他地方在貝寶的API量AMOUNTAMT,但對於行項目,這是COST

1

Express Checkout for Payflow guide

你可以通過:

L_NAMEn L_DESCn L_COSTn L_TAXAMTn L_QTYn

關於如何實現這些信息,請參閱本指南的57頁。

這些變量將允許您在PayPal結帳頁面上顯示訂單項詳細信息。

+0

如果您使用NVP API,則可以使用該功能。正如你所看到的,我正在使用.net payflow SDK API。 – nuander

相關問題