HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Passing User ID to Paypal Donate

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#108421 (In Topic #21120)
TQ
Avatar

Honoured member

Hi All,

As many of my users have a different email address for my site to the one they use for Paypal and they seldom provide any clue as to who the donator is (in relation to my site), I need to pass additional info with the donate button.

I'm aware that I can setup variables in the Paypal button creator and believe that the appropriate variable to use is 'memo' to pass my user's ID.

If, in the variable setup at Paypal, I use 'memo={$USERNAME}', it doesn't change (or add anything to) the button code. Am I missing the point or will this be picked up anyway?

I'd appreciate some guidance from anyone out there that has experience with passing information to Paypal such as outline above?

Thanks

TQ
Back to the top
 
Posted
Rating:
#108424
Avatar

That should work in principle. I haven't used the PayPal button generator in a while, but let's assume it doesn't "encrypt" the output and you can hand edit it…

Hand-edit the output to ensure that {$USERNAME} is passed through in the hidden input as expected. Perhaps it doesn't work from the button generator because it encodes it somehow.

If you're editing via Comcode:
Make sure you're using 'semihtml' Comcode tags, not 'html' ones. 'semihtml' is needed for Comcode/Tempcode to mix with the HTML.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#108430
TQ
Avatar

Honoured member

Chris Graham said

That should work in principle. I haven't used the PayPal button generator in a while, but let's assume it doesn't "encrypt" the output and you can hand edit it…

Hand-edit the output to ensure that {$USERNAME} is passed through in the hidden input as expected. Perhaps it doesn't work from the button generator because it encodes it somehow.

If you're editing via Comcode:
Make sure you're using 'semihtml' Comcode tags, not 'html' ones. 'semihtml' is needed for Comcode/Tempcode to mix with the HTML.
Hi Chris,

I am doing as you said ie. passing the username as a hidden field and neither OCP or Paypal baulk but PP doesn't seem to respond to it.

Even though I've read elsewhere that the donate button does not accept variables, I do find that a little surprising as PP provide a section in the button generator for variables. My guess is that only a limited range of variables can be passed. Pity they don't make this clear in their help system.

There is however a custom field in PP that I've edited to specifically ask the user to include my site username and I've laid it on thick on the donate page of the site so I'll see how that goes.

Thanks for your input.

TQ
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: