www.paypal.com/jp/cgi-bin/webscr? item_name encoding - encoding

I am working on a site that is trying pass a japanese item name to paypal through
this form
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input name="cmd" value="_xclick" type="hidden">
<input name="item_name" value="フォトグラフィー基礎コース" type="hidden">
<input name="amount" value="59000" type="hidden">
<input name="currency_code" value="JPY" type="hidden">
<input type="hidden" name="item_number" value="PHP001">
<input name="no_note" value="0" type="hidden">
<input type="hidden" name="lc" value="ja_JP">
<input name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest" type="hidden">
<input class="coursepayment" name="submit" value="今すぐ購入" alt="PayPal - The safer, easier way to pay online!" border="0" type="submit">
</form>
But the Item name comes out reading:
フォトグラフィー基礎コース
Is there a way to fix this?

See the documentation for the form method:
https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/formbasics/#setting-the-character-set--charset
Setting the Character Set — charset
Use the charset HTML variable to specify the character set and
character encoding for the billing information/log-in page on the
PayPal website. In addition, this variable sets the same values for
information that you send to PayPal in your HTML button code.
For example, the following INPUT tag sets the encoding to UTF-8:
<INPUT TYPE="hidden" name="charset" value="utf-8">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
<input name="cmd" value="_xclick" type="hidden">
<input type="hidden" name="charset" value="utf-8">
<input name="item_name" value="フォトグラフィー基礎コース" type="hidden">
<input name="amount" value="59000" type="hidden">
<input name="currency_code" value="JPY" type="hidden">
<input type="hidden" name="item_number" value="PHP001">
<input name="no_note" value="0" type="hidden">
<input type="hidden" name="lc" value="ja_JP">
<input name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest" type="hidden">
<input class="coursepayment" name="submit" value="今すぐ購入" alt="PayPal - The safer, easier way to pay online!" border="0" type="submit">
</form>

Another alternative is to set the default encoding accepted by the PayPal account (which as of today is still not utf-8 until you set it that way).
Check "More Options" under https://www.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-language-encoding

Related

Show paypal buy button in fancybox popup?

How can I put this code into fancybox popup, and activate it whenever my <a> button gets pressed?
Here is the code:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="test#gmail.com">
<input type="hidden" name="lc" value="IN">
<input type="hidden" name="item_name" value="Item 1">
<input type="hidden" name="amount" value="1.00">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest">
<table>
<tr><td><input type="hidden" name="on0" value="Your info">Your info</td></tr><tr><td><input type="text" name="os0" maxlength="200"></td></tr>
<tr><td><input type="hidden" name="on1" value="More info">More info</td></tr><tr><td><input type="text" name="os1" maxlength="200"></td></tr>
</table>
<input type="image" src="https://www.paypalobjects.com/en_GB/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online.">
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>
Any help or suggestions are well appreciated.
P.S.: I will have multiple different buttons on my store, and each one should open different popup since each item costs different amount.
Please put the contents of your paypal button (that you have mentioned in the question) in say "myfancybox.html"
then in your file add:
<a data-fancybox-type="iframe" href="myfancybox.html">Pay</a>

Cancel URL not showing on paypal

This is my form
<form action="https://sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="#param">
<input type="hidden" name="lc" value="IN">
<input type="hidden" name="item_name" value="MyItem">
<input type="hidden" name="amount" value="100.00">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="cancelUrl" value="http://localhost:9000">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_paynowCC_LG.gif:NonHostedGuest">
<input type="image" src="https://www.paypalobjects.com/en_GB/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online.">
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>
What should i also add here so that i can get cancel and back to the buyesr's site option?
Q2- How i will add direct credit card payment rather create paypal account ? please help
i want to show like this
You've misspelt it. It is 'cancel_url'.
on the checkout page, look for the 'cancel_return' hidden form element:
<input type="hidden" name="cancel_return" id="cancel_return" value="" />
set the value of the cancel_return form element to the URL you wish to return to:
<input type="hidden" name="cancel_return" id="cancel_return" value="http://royaltytech.in" />

Paypal Return URL

I need to allow recurring subscription to take place. So far, It is looking good except that Paypal is not honoring completely the "return" hidden variable value. It does the redirect but it omits the supplied query string. It does add couple querystring variables such as www.mysite.com?auth=XXXX&form_charset=YYYY
For my solution, I want to rely on some values on the query string if that possible. Otherwise, I would have to store that temporary info in Session.
Any ideas?
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="MerchantEmailAddress" />
<input type="hidden" name="item_name" value="Description of Transaction">
<input type="hidden" name="a3" value="5.00">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="M">
<input type="hidden" name="src" value="1">
<input type="hidden" name="custom" value="111.111111" />
<input type="hidden" name="invoice" value="11" />
<input type="hidden" name="cancel_return" value="http://www.MySite.com/?Cmd=Cancel" />
<input type="hidden" name="return" value="http://www.MySite.com/?Cmd=Return" />
<input name="notify_url" value="http://www.MySite.com/?Cmd=Notify" type="hidden">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0" src="https://www.paypalobjects.com/en_US/i/btn/btn_subscribe_LG.gif"
alt="PayPal - The safer, easier way to pay online">
<img alt="" border="0" width="1" height="1"
src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif">
</form>
Adding the rm=2 variable and value should work. That would tell PayPal to send information back as a POST. If you have Payment Data Transfer enabled in your seller account it would overwrite the rm value and the information returned to your site from PayPal would always be a GET.

Paypal subscription button, dynamin amount

I have to use paypal subscription button. it is working fine. my problem is , If we can make amount dynamic. If not than what is the best option to configure subscription plan with dynamic amount.
My current button code is
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input name="custom" type="hidden" id="custom" value="<?php echo $this->uri->segment(3); ?>">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="valuedummy">
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_subscribeCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
Once try this code
<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="me#mybusiness.com">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="no_shipping" value="1">
<input type="image" src="http://www.paypal.com/en_GB/i/btn/x-click-but20.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="a3" value="5.00">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="M">
<input type="hidden" name="src" value="1">
<input type="hidden" name="sra" value="1">
</form>
or click this link
or Paypal subscription button
I am currently working on a Paypal subscription page where the user can select from a number of subscriptions (radio buttons). Each radio button has attributes with the values I need:
<input id="4" class="packageRadio" type="radio" value="4" data-desc="6 month package" data-type="M" data-period="6" data-amount="240.00" data-count="2" name="package">
When a user selects a package a jQuery click event function on the radio button adds the required values to my Paypal form.

Passing Address details via the Buy Now button

I am trying to pass my users details to Paypal screen using the appropriate html variables but only some are getting passed!?!?!? This is driving me mad! The order details are fine.
My code is:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick" />
#*Order Details*#
<input type="hidden" name="business" value="sales#xxxxxx.co.uk">
<input type="hidden" name="item_name" value="Order Number 123">
<input type="hidden" name="amount" value="200.00">
<input type="hidden" name="currency_code" value="GBP">
#*Address Stuff *#
<input type="hidden" name="first_name" value="Barry">
<input type="hidden" name="last_name" value="White">
<input type="hidden" name="address1" value="1 Big Street">
<input type="hidden" name="address2" value="Big Mountain">
<input type="hidden" name="city" value="Big City">
<input type="hidden" name="country" value="GB">
<input type="hidden" name="email" value="Bob#bob.com">
<input type="hidden" name="lc" value="UK">
<input type="image" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_buynowCC_LG.gif"
border="0" name="submit" alt="PayPal — The safer, easier way to pay online." />
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1" />
</form>
The paypal screen shows some of the fields (name, email country!) but not all
Why are some of the fields populating and some not!!!!!!!!!
Thanks
It seems that if you don't supply all the address details then it will not display any!
If I add the zip field then it displays the address.
Paypal integration should be so simple but their documentation is so bad - shows what monopolies do for you.
all the address fields are optional according to the documentation ffs