Search code examples
paypalpaymentexpress-checkoutnvp

Line items on the paypal express checkout using Paypal Payments Advanced (and the NVP API)


I'm using Paypal Payments Advanced with the hosted checkout page (iframe). This gives customers an option to click the "pay with paypal"(button) which is paypal's Express Checkout or pay using a credit card. Everything seems to be working great, except I am unsuccessful at making individual line items show when passing parameters using the NVP API. Instead I only see a total amount (See picture below).

paypal checkout

And I also believe this means the line items are not being sent at all (even when I pay using a credit card) since I don't see any line items when I log into paypal to view the details of the transactions.

Here are the NVP parameters I'm currently using:

"PARTNER"  => "PayPal", 
"VENDOR"   => "company_here",
"USER"     => "user_here",
"PWD"      => "password_here", 
"TRXTYPE"  => "S",
"AMT"      => "2.16",
"ITEMAMT"  => "2.00",
"TAXAMT"   => "0.16",
"L_NAME0"  => "Test Product 1",
"L_DESC0"  => "Test Product Description",
"L_AMT0"   => "1.00",
"L_TAXAMT0"=> "0.08",
"L_QTY0"   => "1",
"L_NAME1"  => "Test Product 2",
"L_DESC1"  => "Test Product 2 description",
"L_AMT1"   => "1.00",
"L_TAXAMT1"=> "0.08",
"L_QTY1"   => "1",
"CUSTOM"   => "Custom Text Here",
"INVNUM"   => "Invoice12345",
"CURRENCY" => "USD",
"CREATESECURETOKEN" => "Y",
"SECURETOKENID"     => "token_here", 

Any ideas what I'm doing wrong?


Solution

  • According to this small section in the Express Checkout for Payflow Pro document (page 19):

    To enable line-item support in reference transactions, which includes the parameters below, you must contact Merchant Technical Support at http://www.paypal.com/mts:

    L_NAMEn
    L_DESCn
    L_COSTn
    L_TAXAMTn 
    L_QTYn
    

    So I called PayPal tech support and they turned on line item support in my paypal manager account. However line-items still weren't being sent in the transaction. So I called them again, and they informed me that, for payflow, the line-items won't show in the express checkout and you can't view them in the transaction details in your paypal account either. They are pretty much ignored. They are actually used for certain processors, but since my processor is PayPal, they weren't being used for anything.

    The idea is that (say you have a shopping cart) you show a breakdown of line-items at the payment screen, just before a user pays (perhaps same screen where you have the payments advanced iframe, a.k.a. hosted checkout page). Then if you ever want to look up what line items were purchased for a specific invoice, you need to make sure you saved this on your web server, not paypal. Then you can look up the invoice number on paypal and compare with the order details stored in your own database.