Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8864801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:20:34+00:00 2026-06-14T16:20:34+00:00

When I receive a notification from Paypal, I send it back to Paypal to

  • 0

When I receive a notification from Paypal, I send it back to Paypal to be sure it is from Paypal.
The code works well and I have no problem:

# payment_notifications_controller.rb # notification_validation, line 90
response = RestClient.post(PAYPAL_CONFIG["url_validate"], params.merge({"cmd" => "_notify-validate"}), :content_type => "application/x-www-form-urlencoded")

The problem is when the user has a Japanese name. The notification (from Paypal) received is like:

Parameters: {"last_name"=>"\x8F\xBC\x8C\xB4", "payment_cycle"=>"Daily", "next_payment_date"....

When I’m trying send it back to Paypal (to be sure it came from Paypal), I have this error:

ArgumentError (invalid byte sequence in UTF-8):
 app/controllers/payment_notifications_controller.rb:90::in `notification_validation'

It’s like if RestClient doesn’t like “\x8F\xBC\x8C\xB4”.
I tried to add :content_type => “shift_jis” and also “utf-8”, but I always have this error.

If I do something like:

params[:last_name] = params[:last_name].encode("UTF-8", "Shift_JIS")
# now params[:last_name] is 松原

Then my RestClient.post is send to Paypal, but Paypal return an error (INVALID) probably because Paypal was waiting to get “\x8F\xBC\x8C\xB4” and not “松原”.

Do you have any idea of how I can resolve that ?

edit:
I also post on paypal forum

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T16:20:37+00:00Added an answer on June 14, 2026 at 4:20 pm

    So I think I have the solution.

    In the seller paypal account go to :
    Profile > My selling tools > PayPal button language encoding > More options

    Use the following drop-down menu to select the encoding used on your
    website.

    Encoding: Shift_JIS

    Do you want to use the same encoding for data sent from PayPal to you
    (e.g., IPN, downloadable logs, emails)?

    NO, use:
    UTF-8

    Now I’m able to get “VERIFIED”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have used the following code to register my app to receive push notification,
In my application, i have used C2DM. Here, when i receive a C2DM message/notification,
How do I receive notification from UIImagePickerController that a Photo has been touched? I
Can we receive any notification from a bluetooth device, even if our app is
As the title says, how can I receive notification whenever a multi-line QTextEdit changes
I trying to use apns-csharp library to send push notification from .NET, I created
I've been trying to implement the C2DMReceiver to receive push notification. I have downloaded
I'am trying to send push notification from my localhost to my iDevices all work
Strange behavior in our receive locations : RL_REPRESENTATIVE is waiting for a notification from
Hi in my application when i receive push notification from server my application badge

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.