Paypal Gateway not sending the Item name and number

Jul 9, 2009 at 7:36 PM

It looks like when using the Paypal Gateway it is sending the <CarName>FJOCart</CartName> as the item name and the order number as the Item#.  I can see this as being confusing to the user.  Is that a setup in a template somewhere that I need to change  or is that something that is hard coded in the app.

https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_xclick&business=FJOSales%40FlyingJOutiftters.com&item_name=FJOCart&item_number=1025&quantity=1&custom=en-US&amount=19.95&shipping=4.90&tax=1.18&currency_code=USD&bn=NB_Store&return=http%3a//www.flyingjoutfitters.com/tabid/101/stg/5/ordID/1025/Default.aspx%3fPayPalExit%3dRETURN&cancel_return=http%3a//www.flyingjoutfitters.com/tabid/101/stg/5/ordID/1025/Default.aspx%3fPayPalExit%3dCANCEL&notify_url=http%3a//www.flyingjoutfitters.com/Cart/stg/4.aspx&undefined_quantity=0&no_note=1&no_shipping=1

Thanks

Larry

Coordinator
Jul 9, 2009 at 11:48 PM

Hi Larry,

I'm a bit unsure what your telling me here?

Is your paypal link not working?

Could you explain a bit more please.

 

Regards,

Dave

 

Jul 10, 2009 at 12:49 AM

The paypal link is working but when I use the above link the paypal checkout cart lists the description as "FJOCart" and Item# as "1025".  I was expecting it to list as the description "My cool item for sale" and the Item # as "My cool items ref #". 

It looks like when your building the link you are using the static property <CarName>FJOCart</CartName> from the paypal.gateway as the Item_Name and the orderid as the Item_Number.  I would think these parameters should be populated from the Items description and ref # such as &item_name=[TAG:PRODUCTNAME]]&item_number=[TAG:PRODUCTRef]]  But it looks like your wrapping the entire order into one batch and sending it through as a generic order batch rather than each individual line item. 

Maybe it is not possibe to send through more than one line item when using PayPal as checkout.

I hope this make sense.

Have a great day!

Larry

Coordinator
Jul 10, 2009 at 6:14 AM

Hi Larray,

I understand now....yes the paypal is simple a batch payment method (group all the items of the checkout into one).  I do believe paypal has some options to pass a detailed item list to it, but I did not see the need to implement this in the NB_Store paypal provider.  If you require this then you'll have to create your own provider, and select the suitable paypal options to make it work.

Regards,

Dave.

Jul 10, 2009 at 3:14 PM

Hi Dave,

Thanks for the reply.  I don't really require thatlevel detail I was mostly just confused by what I was seeing in the PayPal Cart.  I will adjust my cartname in the PayPal.gateway file to better identify what the user is seeing in the cart to help prevent any confusion.

Thanks

Larry

Jul 14, 2009 at 1:45 AM

I have gotten through to PayPal via the Paypal.Gateway (with the correct total amount displayed), and my ReturnURL is working for the CANCEL option fine.

However, when in Paypal and I choose to pay by credit card, the Shipping Address isn't being pre-populated. I would like to pass all the user info to Paypal so the user doesn't have to re-enter their data in paypal. I have successfully accomplished this via another application (outside of NB_Store), so I'm wondering how to do this in the Paypal Gateway of NB_Store.

For example, in my other app, I specify the following:  
    <input type="hidden" name="cmd"             value="_xclick" />
    <input type="hidden" name="business"         value="me@mystore" />
    <input type="hidden" name="item_name"         value="my order" />
    <input type="hidden" name="first_name"         value="<%=lblShipFirst.Text %>" />
    <input type="hidden" name="last_name"         value="<%=lblShipLast.Text %>" />
    <input type="hidden" name="address1"         value="<%=lblShipAddress.Text %>" />
    <input type="hidden" name="city"             value="<%=lblShipCity.Text %>" />
    <input type="hidden" name="state"             value="<%=lblShipState.Text %>" />
    <input type="hidden" name="zip"             value="<%=lblShipZip.Text %>" />
    <input type="hidden" name="night_phone_a"     value="<%=lblPhoneA.Text %>" />
    <input type="hidden" name="night_phone_b"     value="<%=lblPhoneB.Text %>" />
    <input type="hidden" name="night_phone_c"     value="<%=lblPhoneC.Text %>" />
    <input type="hidden" name="amount"             value="<%=lblTotalAmount.Text %>" />
    <input type="hidden" name="shipping"         value="<%=lblTotalShipping.Text %>" />
    <input type="hidden" name="tax"             value="<%=lblTotalTax.Text %>" />
    <input type="hidden" name="address_override"  value="1" />
    <input type="hidden" name="country"         value="USA" />
    <input type="hidden" name="currency_code"     value="USD" />
    <input type="hidden" name="no_shipping"     value="2" />
    <input type="hidden" name="rm"                 value="2" />
    <input type="hidden" name="return"             value="mysite/PayPalSuccess.aspx" />
    <input type="hidden" name="cancel_return"     value="mysite/PayPalCancel.aspx" />
    <input type="hidden" name="image_url"         value="mysite/logo.png" />
    <input type="hidden" name="bn"                value="PP-BuyNowBF" />
    <img alt="" style='border:0px;' src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
    <asp:Button ID="Button2" runat="server" Text="Pay Now" PostBackUrl="https://www.paypal.com/cgi-bin/webscr" />

How can I set these values in the PayPal.Gateway? I imagine I can use the token values (ie. [OrderUser:FirstName, :LastName], etc;  [SAddress:Address1, :City], etc.;  [Cart:TotalAmt, :ShipAmt, :TaxAmt;  etc.]).  I just need to know the correct syntax for modifying the following Paypal.Gateway that I'm using:

<root>
<paymentURL>https://www.paypal.com/xclick</paymentURL>
<verifyURL>https://www.paypal.com/cgi-bin/webscr </verifyURL>
<PayPalID>me@mysite.com </PayPalID>
<CartName>Cart </CartName>
<ButtonImageURL>http://mysite/Desktopmodules/NB_Store/img/paypal60x38.gif </ButtonImageURL>
<Currency>USD</Currency>
<ReturnURL>http://mysite/Shop/tabid/92/Default.aspx?PayPalExit=RETURN </ReturnURL>
<ReturnCancelURL>http://mysite/Cart/tabid/91/stg/3/Default.aspx?PayPalExit=CANCEL </ReturnCancelURL>
<ReturnNotifyURL>http://mysite/Shop/tabid/92/Default.aspx </ReturnNotifyURL>
<MerchantLanguage>en </MerchantLanguage>
</root>

Any help is greatly appreciated!

Coordinator
Jul 14, 2009 at 3:26 AM

This would greatly improve the PayPal payment process! Let's see what Dave says.

Rob

Coordinator
Jul 14, 2009 at 11:12 AM

Hi Larry,

To do this I'll need to change the code,  I don;t mind doing this as it's a quick job.  The problem is the time testing.  If you want to take on the responsiblity of testing the gateway I'll do the changes.

Email me through codeplex and I'll send you an install package for an updated version.

 

Regards,

Dave.

Jul 14, 2009 at 1:54 PM

Hi Dave,

I'm not sure whether your reply to Larry was meant for me, dbs, but I'll answer as though it is.

I would be thrilled to use whatever code you provide and do the testing of it. Just to be sure we're clear: I would like to use the Paypal.Gateway interface to pick up the TAG values for OrderUser, SAddress, Phone(broken down into 3 strings per Paypal's requirement), and Cart info.

<input type="hidden" name="first_name"     value="[OrderUser:FirstName]" />
<input type="hidden" name="last_name"     value="[OrderUser:LastName]" />
<input type="hidden" name="address1"      value="[SAddress:Address1]" />
<input type="hidden" name="city"               value="[SAddress:City]" />
<input type="hidden" name="state"             value="[SAddress:RegionCode]" />
<input type="hidden" name="zip"                value="[SAddress:PostalCode]" />
<input type="hidden" name="night_phone_a"     value="111" />
<input type="hidden" name="night_phone_b"     value="222" />
<input type="hidden" name="night_phone_c"     value="3333" />
<input type="hidden" name="amount"         value="[Cart:TotalAmt]" />
<input type="hidden" name="shipping"        value="[Cart:ShipAmt]" />
<input type="hidden" name="tax"                value="[Cart:TaxAmt]" />

If you can suggest another way, that's great, too.

Thank you!

Coordinator
Jul 14, 2009 at 2:09 PM

Hi dbs,

Sorry, yes it was to you dbs, I read the wrong name at the top of the post.  I'll create a new version and email it to you.

Regards,

Dave.

Jul 14, 2009 at 2:10 PM

You're a lifesaver! Thanks a million! :)

Jan 28, 2013 at 12:07 PM
Edited Jan 28, 2013 at 12:07 PM

If somebody figured on how to send line items to PayPal please let me know. Currently we linked PayPal with Quickbooks and we have no way of knowing what the user paid for to categorize the items in quickbooks. Please help.

Coordinator
Jan 28, 2013 at 11:49 PM

PayPal is only used to process the payment, not operate as an additional cart. I would be looking to export orders from the store itself if you need to record the sales elsewhere.

Regards
Rob

May 24, 2014 at 6:14 PM
Has this been resolved yet? Can the paypal gateway send the item name as opposed to the store name?
Coordinator
May 25, 2014 at 7:55 AM
No, the cart only uses PayPal to process the payment, not to operate as a secondary cart.
You sales records are in the store, not in PayPal. This is the same with all payment gateways.
Regards
ROb
Jun 4, 2014 at 6:57 AM
Can you point me in the right direction and/or explain how I can make this happen? Is there a way to update the cart info field in the paypal.gateway file so that it pulls from the item description?
Coordinator
Jun 4, 2014 at 7:22 AM
You can't send an entire cartload of products to PayPal via a querystring (which is the method the gateway uses to post the payment). The URL would be too long and would fail.

You would need to create a new gateway plugin to handle this. However I'm unsure if the full line item details can be passed through to the gateway - Dave will know more about this and should comment.
Rob