we have several PDF report products. We create PayPal buy now buttons for each, and we use PayPal IPN to email the PDF reports upon successful payment. We’ve been having ongoing issues where some orders just don’t seem to get processed by our IPN web service, which is just an ASP.NET aspx page, and uses the standard Request[“paypal_key”] parameter processing.
I started doing some digging and seemed to find that the IPN web service is not able to process orders where the product name as configured in the PayPal button contains the ampersand character, or the copyright symbol…possibly others, but that’s just what I’ve observed so far.
PayPal’s merchant services logs the IPN messages sent when transactions take place. I looked at the log today for an IPN that we should have received and processed. Here is the IPN, edited for confidentiality:
mc_gross=99.00&protection_eligibility=Ineligible&payer_id=FZKLXR5FF6LMN&tax=0.00&payment_date=08:01:23
Apr 20, 2011
PDT&payment_status=Completed&charset=windows-1252&first_name=Shan&mc_fee=3.17¬ify_version=3.1&custom=&payer_status=unverified&business=email@email.com&quantity=1&verify_sign=AtiSwnZrh-0NXJaYKeFJ5mXp3NePA7jXOzMIt6S.rapcfeP2iL3He53H&payer_email=email@email.com&contact_phone=555-555-5555&txn_id=36P12783M6206263T&payment_type=instant&btn_id=29294177&last_name=Plourde&receiver_email=email@email.com&payment_fee=3.17&shipping_discount=0.00&insurance_amount=0.00&receiver_id=STR4XMP3MUHLS&txn_type=web_accept&item_name=2010
Product Name With & Character
Report©&discount=0.00&mc_currency=USD&item_number=85&residence_country=US&receipt_id=4921-6005-8542-0925&handling_amount=0.00&shipping_method=Default&transaction_subject=2010
Product Name With & Character
Report©&payment_gross=99.00&shipping=0.00&ipn_track_id=b9bQ70Jiv82s3HRqBqLfpw
After doing some testing, I was able to consistently reproduce that the IPN notification process succeeds if the PayPal button is created without the ampersand or copyright symbols. I also called PayPal and they confirmed that they don’t encode product names, they just send them over the wire as-is.
We’re just using standard ASP.NET request processing to get the IPN values:
Request["receiver_email"]
Request["item_number"]
I’m wondering if anyone else has experienced this issue? I’m thinking that our only resolution is to recreate all of our PayPal buttons, and specify product names that contain no ampersands or special characters. I’m not sure if it would be possible to properly parse IPN notifications otherwise. But would be curious to hear about other’s experiences, and possible ideas to parse the IPN messages so that we could continue to allow ampersand characters etc.
Thanks
Shan
To follow up on this question…the only solution that I was able to come up with was to remove ampersand characters from our product names. It seems that the copyright symbol was also causing IPN processing issues. So we keep our product names within PayPal free of special symbols now.
I wish we didn’t have to do this, i.e. that all of our product names specified with PayPal buttons could have any encoding. But, it’s a solution.