Custom variable not received in IPN

itsjp
Contributor
Contributor

Hi,

I am using HTML button code and I have set up IPN and it was working fine till last month, but from last month some IPN messages missing custom values "custom=&payer_status=verified" like this.

Help me please

Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

angelleye
Advisor
Advisor

You need to eliminate the spaces you have between the parameter name, the equals sign, and the value.  Some of your parameters are fine, but others are including this space.  

 

For example, this one is good:

 

redirecturl += "&item_name=" + productName

 

These are no good:

 

 

redirecturl += "&currency_code = " + currencyCode
redirecturl += "&custom = " + customValues

 

PayPal is tightening up the rules for Payments Standard, so spaces like this will cause problems now when they didn't before.  

Angell EYE - www.angelleye.com
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!

View solution in original post

Login to Me Too
8 REPLIES 8

MTS_Nacho
Moderator
Moderator

// Moving message outside of unrelated thread


@itsjp Could you provide an example of transaction ID where the custom value wasn't returned in the IPN?

 

Also, if your custom value include spaces, please remove them as we don't support spaces within "custom" in the new checkout.

 

 

EDIT: We DO support spaces within custom (refer to my clarification below).

Login to Me Too

angelleye
Advisor
Advisor

Woh...I didn't know the custom parameter was no longer going to support spaces.  That's going to be a burden on all sorts of people.  I didn't see that included in the documentation about the upcoming changes.  Can you point that out to me for clarification please?

Angell EYE - www.angelleye.com
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
Login to Me Too

MTS_Nacho
Moderator
Moderator

@angelleye You are correct and we will continue to support spaces in the value of the "custom" variable.

 

I just interpreted wrongly a recent internal escalation for missing "custom" variable in IPNs, where our product developers concluded the reason was the inclusion of a space.

 

However, the space was actually included as part of the variable name, and not the value (eg: custom%20=123456) ,so this was obviously failing as intended.

 

Apologies for any confusion!

Login to Me Too

angelleye
Advisor
Advisor

Whew!  Thanks for clarifying!

Angell EYE - www.angelleye.com
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
Login to Me Too

itsjp
Contributor
Contributor

@MTS_NachoThank you for your reply. I PM my transaction ID with missed custom values.

And I have one more doubt, I asked the same question in Paypal Merchant technical support and they asked me to change the encoding to  in my profile.

They send me following steps:

The IPN validation has failed due to encoding. Can you help to change the settings in your PayPal account.
1.  Log into your PayPal account
2.  Go to your profile
3.  Look for the “PayPal button language encoding” section under the My selling tools
4.  Make sure your website language is set to the correct language
5.  Click the more options button
6.  Make sure encoding is set to UTF-8
7.  Then save settings

 

But I am not using a button created in Paypal, so do I need to change the encding? Could you advise me on the same please.

Login to Me Too

itsjp
Contributor
Contributor

@MTS_NachoHI here is my code :

 

redirecturl += "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=" + ConfigurationManager.AppSettings("paypalemail").ToString()
redirecturl += "&amount=" + price     

            'Mention URL to redirect content to paypal site

redirecturl += "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=" + ConfigurationManager.AppSettings("paypalemail").ToString()

            'Product Name
redirecturl += "&item_name=" + productName

            'Product code
redirecturl += "&item_number=" + productCode

           'Currency code 
redirecturl += "&currency_code = " + currencyCode
redirecturl += "&lc=AU"

            'IPN handler
redirecturl += "&notify_url = " + ConfigurationManager.AppSettings("NotifyUrl").ToString()
redirecturl += "&rm = 2"

            'custom fields
redirecturl += "&custom = " + customValues

            'Success return page url
redirecturl += "&return=" + ConfigurationManager.AppSettings("SuccessURL").ToString()

            ' Failed return page url
redirecturl += "&cancel_return=" + ConfigurationManager.AppSettings("FailedURL").ToString()

Response.Redirect(redirecturl)

 

And if it is the space ,I wonder how it worked for me till last month ? Please advise me.

Login to Me Too
Solved

angelleye
Advisor
Advisor

You need to eliminate the spaces you have between the parameter name, the equals sign, and the value.  Some of your parameters are fine, but others are including this space.  

 

For example, this one is good:

 

redirecturl += "&item_name=" + productName

 

These are no good:

 

 

redirecturl += "&currency_code = " + currencyCode
redirecturl += "&custom = " + customValues

 

PayPal is tightening up the rules for Payments Standard, so spaces like this will cause problems now when they didn't before.  

Angell EYE - www.angelleye.com
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
Login to Me Too

itsjp
Contributor
Contributor

@angelleyeThank you very much

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.