ClassCreator.com | Blockbuster sites, amazing reunions

Share Tips

New Topic Reply Subscription Options  

PayPal HTML Widget on Page

Forums: General Discussion
Created on: 03/19/15 05:14 PM Views: 1695 Replies: 23
Thursday, March 19, 2015 at 5:14 PM

I set up a Paypal payment widget (via html code) on our page... Here's the problem: When it's clicked on in live mode it jumps to a page and says: "Invalid for Variable: Host Button ID"... Any thoughts on how I can make this work?

I do not want to use the donation manager... I would like to use this avenue as we have in the past.

I look forward to hearing from you.

Take Care,
Bruce

East High Class of 1990
Web Administrator

Reply
Thursday, March 19, 2015 at 10:07 PM - Response #1

If you have used this way to access PayPal in the past, it sounds like something at PayPal has changed. Have you contacted them to ask?


Reply
Thursday, March 19, 2015 at 10:13 PM - Response #2

Been using same PayPal html code on CC since 2010 and on another site since 2000. Can you show the code here in a "Code" box (3rd icon from the right)? (I couldn't see anything on the home page).

Alternately you can check out our site and click the Donate button on top which opens a popup with the "old" html PayPal Donate button. You can look at the source and compare it to yours.

Reply
Edited 03/19/15 10:16 PM
Friday, March 20, 2015 at 3:43 PM - Response #3

I think its an issue with Class Creator since I can click on it in the edit page, but when I go live with it it doesn't work. Does that make sense?

Reply
Friday, March 20, 2015 at 3:46 PM - Response #4

Thanks, Jack. We're trying to sell tickets to our 25th Reunion, so a "donation" may not be the best way to go.

Reply
Friday, March 20, 2015 at 3:58 PM - Response #5

which page should I be looking at to see your code?


Reply
Friday, March 20, 2015 at 4:06 PM - Response #6

Hello and thanks for checking, Kyle. It should be on now. The "25th Reunion" page.

Reply
Friday, March 20, 2015 at 4:24 PM - Response #7

In the SOURCE of your document, you have an input field named

name="hosted_button_id"

It sounds like from the error message that the value of that button is wrong.

https://developer.paypal.com/docs/classi...on-guide/formbasics/
Important: Do not write HTML button code for saved payment buttons yourself. The value for the hosted_button_id variable is generated solely by PayPal. Results are unpredictable if you use your own value.


Reply
Friday, March 20, 2015 at 4:34 PM - Response #8

I think I may have fixed the problem. Thank you for your assistance, Kyle!

Reply
Friday, March 20, 2015 at 4:50 PM - Response #9

Okay, maybe not. Interesting.

Reply
Friday, March 20, 2015 at 5:06 PM - Response #10

I meant it as an example of how to code - although I thought "Donation Manager" implied you wanted a Donation.Question

Non-Donation code is pretty much the same as any other PayPal code (see Kyle's link) - which is what I use on my other site since 2000. So there's still a mistake on the code if it doesn't work yet. Can't be more definitive without seeing the code.

Bruce Copeland wrote:

Thanks, Jack. We're trying to sell tickets to our 25th Reunion, so a "donation" may not be the best way to go.

Reply
Friday, March 20, 2015 at 5:38 PM - Response #11

I just sent you a message, Jack.

Reply
Friday, March 20, 2015 at 7:47 PM - Response #12

OK - hold on a bit while I look at the details you want so it comes out correctly. I changed to this (edit: you had target=_top and that works too. So maybe you had the same reaction I did when you didnt' see the complete text noted on next post?)

Reply
Edited 03/20/15 8:19 PM
Friday, March 20, 2015 at 8:15 PM - Response #13

And that's all you need. The description is shortened on checkout but it's all there when you "hover" over "Options" on the PayPal payment screen left side checkout.

Wasn't sure at first Cool Was that your reaction too?

Reply
Edited 03/20/15 8:19 PM
Saturday, March 21, 2015 at 5:44 PM - Response #14

This PayPal Page discusses "hosted_button_id"

Reply
Saturday, March 21, 2015 at 8:00 PM - Response #15

I think that I figured it out. I had a earlier copy and pasted info from a previous reunion that had a PayPal button on it. When I removed the old button, it seemed to clear things for the new registration. Thanks for somehow making me think of that and I hope this info helps others that run into this issue.

Reply
Monday, March 23, 2015 at 12:17 PM - Response #16

The same message popped up -

invalid form variable: HOSTED_BUTTON_ID

I'm stumped.

Reply
Monday, March 23, 2015 at 12:25 PM - Response #17

There is something else on your page since the exact same code worked for me on a plain test page.

I' guessing this is on a CC Payment page similar to the one Mark above tried. If so, there is indeed "something" with the CC code that is interfering and it would be related to having dual conflicting methods of payment.

Reply
Monday, March 23, 2015 at 1:17 PM - Response #18

It does work on a test page, but when you publish it and go onto the actual page does it work? That's what I'm running into.

Reply
Monday, March 23, 2015 at 1:38 PM - Response #19

Kyle - Forgive me for being so dense, but there is a way to use PayPal through Class Creator and have payments go directly into the PayPal account versus the check from CC every two weeks? I honestly think I am making this out to be harder than it really is.

Reply
Edited 03/23/15 1:57 PM
Monday, March 23, 2015 at 3:17 PM - Response #20

"Publish It" implies you are using one of the new methods (planner, donations, etc) and not just a regular page since regular pages don't have that as an option.

So there is underlying PayPal code on those type of pages that interferes - you'd have to see the page as activated (via a browser debug tool) to detect this, not just the source you added.

(IOW, if you put the code on a regular page it will work as coded. That's a page you create on the main page, NOT Event Planner, Donation or Products.)

Bruce Copeland wrote:

It does work on a test page, but when you publish it and go onto the actual page does it work? That's what I'm running into.

Reply
Edited 03/23/15 3:19 PM
Monday, March 23, 2015 at 3:24 PM - Response #21

PayPal is still PayPal - always goes into the PayPal account. CC doesn't get the money Exclamation IOW, to get the PayPal money use the regular PayPal bank transfer feature to your bank account.

So if you want to use one of the newer preset "for sale" pages, use the PayPal API approach as documented by CC (vs the stand-alone method).

Bruce Copeland wrote:

Kyle - Forgive me for being so dense, but there is a way to use PayPal through Class Creator and have payments go directly into the PayPal account versus the check from CC every two weeks? I honestly think I am making this out to be harder than it really is.

Reply
Tuesday, March 24, 2015 at 1:21 PM - Response #22

Thanks, Jack! That was the key... Getting away from the new preset sale pages allowed me to use the code without any issues. Thanks again for all your help!

Reply
Wednesday, March 25, 2015 at 9:57 AM - Response #23

Interestingly enough it all works, but the PayPal "Pay Now" button function does not work on smartphones. Not sure how big of an issue this is, but I assume in this day and age a lot of folks do conduct transactions through smartphones. Any thoughts?

Reply
New Topic Reply  
Subscription Options: Have all new forum posts sent directly to your email.
Subscription options are available after you log in.