Item description not showing up on details - paypal

I have a cart form that submits to paypal with the item_name and item_number. As of recently though, some of the paypal receipts (transaction details) I have been receiving are excluding the "item_number" in the description. I need this number to know what products the user has purchased.
The only common factor with the receipts that do not include the "item_number" are ones that have a "Receipt No:" with the text "Please keep this number for future reference, as your customer doesn't have a PayPal Transaction ID for this payment."
Any idea why this is happening, or what I need to do to get the "item_number" to show up on the receipt?
Code Example:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<label for="first_name">First Name*:</label>
<input type="text" name="first_name" id="first_name" class="required">
<label for="last_name">Last Name*:</label>
<input type="text" name="last_name" id="last_name" class="required">
<label for="email">Email*:</label>
<input type="text" name="email" id="email" class="required email">
<input type="hidden" name="item_name" value="Personalized Frame">
<input type="hidden" name="item_number" value="|S5|M8|T8|black">
<input type="submit" value="Add to Cart">
</form>

Related

Not able to specify "amount" per payment request on PayPal HTMLButton

I am trying to integrate with PayPal using the "HTML Buttons" approach.
The checkout flow is rather simple,
user clicks "Buy Now" -> transferred to PayPal -> payment processed -> returned to the site.
Based on the item that the customer wants to "Buy Now", the "amount" in the submitted form will vary, and I am unable to get PayPal to accept the value I am sending. I always see a text input which is empty when redirected to PayPal.
I tried hosted and unhosted buttons but still not able to see the desired effect.
hosted button HTML example:
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="HOSTEDBTNVALUE">
<input type="image" src="https://www.sandbox.paypal.com/en_GB/SG/i/btn/btn_buynowCC_LG.gif" name="submit" alt="PayPal – The safer, easier way to pay online!" style="border: 0;">
<img alt="" src="https://www.sandbox.paypal.com/en_GB/i/scr/pixel.gif" style="border: 0; width: 1; height: 1;">
<input type="text" readonly="true" name="item_name" value="Test PayPal integration payment">
<div class="form-group" id="amount_field">
<label class="control-label col-md-2" for="amount">Amount</label>
<div class="col-md-5">
<input type="text" id="amount" name="amount" value="100" aria-describedby="amount_info_0" class="form-control"><span id="amount_info_0" class="help-block">Real</span></div>
</div>
<div class="form-group" id="txnRef_field">
<label class="control-label col-md-2" for="txnRef">Transaction Ref</label>
<div class="col-md-5">
<input type="text" id="txnRef" name="txnRef" value="8d724ad470af4d9d91d49f84068c4bab" aria-describedby="txnRef_info_0" class="form-control"><span id="txnRef_info_0" class="help-block">Required</span></div>
</div>
<input type="hidden" name="currency_code" value="SGD">
</form>
The "amount" above is a text input at the moment because this is my integration testing page, in the actual application it will be a hidden/readonly input embedded in the form.
Here is the unhosted button example code:
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----ReallyLongKey-----END PKCS7-----">
<input type="image" src="https://www.sandbox.paypal.com/en_GB/SG/i/btn/btn_buynowCC_LG.gif" name="submit" alt="PayPal – The safer, easier way to pay online!" style="border: 0;"><img alt="" src="https://www.sandbox.paypal.com/en_GB/i/scr/pixel.gif" style="border: 0; width: 1; height: 1;">
<input type="hidden" name="notify_url" value="https://myapplication.com/transaction/paypal/status">
<input type="hidden" name="currency_code" value="SGD">
<input type="hidden" name="custom" value="ad4a63e2f2f04b908ddb8e7c67f9c67a">
<input type="text" readonly="true" name="item_name" value="Test PayPal integration payment">
<div class="form-group" id="amount_field">
<label class="control-label col-md-2" for="amount">Amount</label>
<div class="col-md-5">
<input type="text" id="amount" name="amount" value="100" aria-describedby="amount_info_0" class="form-control"><span id="amount_info_0" class="help-block">Real</span></div>
</div>
<div class="form-group" id="txnRef_field">
<label class="control-label col-md-2" for="txnRef">Transaction Ref</label>
<div class="col-md-5">
<input type="text" id="txnRef" name="txnRef" value="ad4a63e2f2f04b908ddb8e7c67f9c67a" aria-describedby="txnRef_info_0" class="form-control"><span id="txnRef_info_0" class="help-block">Required</span></div>
</div>
</form>
I have screenshots below for the application page and what I see as a result on the PayPal payment page. Please excuse the lack of alignment and styling. This is meant to be a proof of concept before it is pretty.
my application test page for integration
paypal page where amount is expected to be fixed based on my request and not editable.
Not sure what I'm doing wrong here. Please help.
thanks.
I was able to get it going by making PayPal generate the button with the following settings:
1. Merchant account IDs: Use my primary email address [did not use secure merchant account ID]
2. unchecking the save button at PayPal checkbox. Also, in the html button generation interface, I clicked the link remove code protection which made the cmd value from _s-xclick to _xclick

Paypal button failed to process some user payment

We integrated Paypal button to support our starting business. We received several user feedbacks about not being able to complete payment. They reported that they can see the payment page after clicking the Buy Now button. However they tried pay through Paypal account, pay with credit card and pay with Paypal credit. None of them work. However, no one in our team has faced such problem when checking out. So we really don't have an idea about what's going on. Here is an example Paypal button code we use:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="business#myticket.com">
<input type="hidden" name="env" value="www">
<input type="hidden" name="address_override" value="0">
<input type="hidden" name="item_name_1" value="演唱会">
<input type="hidden" name="amount_1" value="122">
<input type="hidden" name="discount_rate_1" value="10">
<input type="hidden" name="item_name_2" value="演唱会">
<input type="hidden" name="amount_2" value="122">
<input type="hidden" name="discount_rate_2" value="10">
<input type="hidden" name="shipping_1" value="$27.95">
<!-- Fill full name in the first_name field -->
<input type="hidden" name="first_name" value="Bruce Lee">
<input type="hidden" name="notify_url" value="https://www.myticket.com/payment/ipn">
<input type="hidden" name="address1" value="">
<input type="hidden" name="address2" value="">
<input type="hidden" name="city" value="">
<input type="hidden" name="state" value="">
<input type="hidden" name="zip" value="">
<input type="hidden" name="country" value="US">
<input type="hidden" name="email" value="">
<input type="hidden" name="custom" value="lmIvjDuZVRsCWFPDdfFsrKiNVrnAbWeTZSINiDuszZEGKjeXfhqxyqRrn">
<input type="hidden" name="paymentaction" value="authorization">
<input type="hidden" name="charset" value="utf-8">
<input type="hidden" name="return" value="https://www.myticket.com">
<input type="hidden" name="cancel_return" value="https://www.myticket.com">
<input type="image" name="submit" border="0" src="https://www.paypalobjects.com/webstatic/en_US/i/buttons/checkout-logo-large.png" alt="Check out with PayPal">
</form>
Is there any problem with this Paypal button? If not, what else could be causing the payment to fail?
Besides, is there a way we can get a message about these failures? Right now we are using IPN. However IPN doesn't seem to notify us about these payment failures.
BTW, myticket.com is a fake url in this post.
Well first, when using Website Payments Standard buttons, you don't get much back as far as the declines. Typically you are only going to get details of declines back when you are using API calls to process the payment. As for the button itself, it looks fine to me. Perhaps some of the issue is with the special characters for the item name which is leading to the failure. You could try creating 2 of the same buttons/items but without the special characters and see if those same buyers run into the issue with the second button that they did with the first one. You could also try using the "lc" variable in your button code to see if this helps. You can see the description of what the "lc" variable does here.

Why email field in PayPal payment button does not get included in the E-mail Notification received by PayPal

I have implemented a PayPal Payment Button that works fine. However i have a question about the email field. I need only email notifications from PayPal. I don't need the PayPal IPN. To understand me better check at my button code:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input name="email" type="email" required value="">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" value="http://www.mywebsite.com/thanks.php" name="return"/>
<input type="hidden" value="http://www.mywebsite.com" name="cancel_return"/>
<input type="hidden" name="business" value="xxxxxxxxxxxxxxx">
<input type="hidden" name="item_name" value="Product Name">
<input type="hidden" name="item_number" value="Product ID">
<input type="hidden" name="amount" value="100">
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="currency_code" value="USD">
<input name="Submit" type="submit" value="PAY">
</form>
As you can see the email field is empty and required and the user need to complete in order to process the form.
How can i transfer the email field information in the PayPal e-mail receipt that i receive from PayPal? Is it possible?
Can you recommend any other method to access that email field information? Maybe i can assign it into the product description which appears in the receipt.
Thanks.
The email address of your buyer's PayPal account will be in the email that you receive from PayPal. However, if you have reason to believe that the email address that you need will be different than the email address on the buyer's PayPal account, then remove the following line:
<input name="email" type="email" required value="">
And replace it with this:
<input type="hidden" name="on0" value="Email">
<input type="email" name="os0" value="" required>

Paypal non-hosted buy now form creation

I have different products in my site to sell.
The problem is that each time for new product i have to manually create a new form using paypal and implement it in site which takes a lot time.While purchase i need two information from customers their email and phone no. .So is there any way to do this by creating a non-hosted paypal form.Can we add text-fields in non-hosted paypal forms?
For Example:(below is non-hosted paypal form how can i add two text fields to it and get them show up in customers purchase detail in paypal)
<div style="width:300px;background-color: #FFFFFF">
<h2 style="text-align:center">
Type in title here</h2>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" name="paypal_form">
<h3 style="text-align:center">
Yummy Logo for $90</h3>
<p align="center">
<input type="submit" value="Buy" /></p>
<input name="cmd" type="hidden" value="_xclick" />
<input name="business" type="hidden" value="my_paypal_email#example.com" />
<input name="item_name" type="hidden" value="logo type x2" />
<input name="amount" type="hidden" value="2" />
<input name="no_shipping" type="hidden" value="1" />
<input name="no_note" type="hidden" value="0" />
<input name="cn" type="hidden" value="Client Comments:" />
<input name="return" type="hidden" value="http://example.com" />
<input name="cancel_return" type="hidden" value="http://example.com" />
<input name="rm" type="hidden" value="1" />
<input name="currency_code" type="hidden" value="USD" />
</form>
</div>
<p>
</p>
Check out HTML Variables for Filling Out PayPal Checkout Pages Automatically.

Paypal hosted button analog for cart form

I use on my site Paypal hosted bottons. When visitors click buttons on my site, a process all data on server, after that i get from paypal via api special link and simply redirect visitors to Paypal
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XXXXXXXXXXXXX
All data like paypal account, custom field, prices and sicounts are safe.
Now I want to implement third party shopping cart on my site. I want to prepare all data like product name, price, discounts, coupons, special offers, etc on server side and redirrect visitors to paypal
But I can't find analog of hosted button for shopping cart form on Paypal manuals
So I should to use usual form with hidden fields
<div>
<form method="post" action="https://www.sandbox.paypal.com/cgi-bin/webscr">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="my#email.com">
<input type="hidden" name="custom" value="asgasgasgagahsdgsdghsgag">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="return" value="http://return.link">
<input type="hidden" name="cancel_return" value="http://cancel.link">
<ul>
<li>
<input name="quantity_1" value="1">
<input type="hidden" name="item_name_1" value="Product 1">
<input type="hidden" name="amount_1" value="25.01">
<input type="hidden" name="discount_amount_1" value="5.00">
</li>
<li>
<input name="quantity_2" value="1">
<input type="hidden" name="item_name_2" value="Product 2">
<input type="hidden" name="amount_2" value="12.71">
<input type="hidden" name="discount_amount_2" value="5.00">
</li>
</ul>
<input type="submit" value="Checkout">
</form>
</div>
I don't like this way, cause data like account email, custom variable, prices and discounts are note safe
Is there any analog of hosted button for shopping cart in paypal?
I would recommend using the Express Checkout API instead of Payments Standard. This gives you complete freedom to customize the checkout solution the way you need to and use your own dynamic variables, etc. but everything is nicely hidden from users because it all happens over the API.