Question

I'm using the .net payflow sdk (Payfolow_dotNET.dll). I have code that allows the customer to use EC but the paypal review page doesn't show the item detail. It just says "You'll be able to see your order details before you pay"

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;

Any thoughts on how to get the item details on the review page? Thx

Was it helpful?

Solution 2

Turns out I was missing one property - the item cost.

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

It's a little bit strange that everywhere else in the Paypal APIs the amount is AMOUNT or AMT, but for line items, it's COST.

OTHER TIPS

Per the Express Checkout for Payflow guide:

You can pass:

L_NAMEn L_DESCn L_COSTn L_TAXAMTn L_QTYn

See page 57 of the guide for info on how to implement these.

These variables will allow you to display line item details on the PayPal checkout page.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top