How do I see the "Custom" field passed in through a Subscribe button (hosted)?

PhoneWipe
Contributor
Contributor

It is not on the email from paypal nor on the transaction detail. I need that field to match the payment with the right account.

 

Thanks -Bradley

Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

skier
Advisor
Advisor

Unfortunately, you can't add a line of code to a "hosted" item button after it has been created.   If you try, your code will be ignored.  That's the intent and design of "hosted" item button code which makes the code tamper proof.   If you want to use the "custom" variable with "hosted" code, you must include the variable and value in Step 3 of the button creation process. 

 

Regards,

 

 

skier

 

 

View solution in original post

Login to Me Too
9 REPLIES 9

skier
Advisor
Advisor

The "custom" variable is designed as a passthrouth variable.   Passthrough variables are intended for your use.   For example, you may have a requirement to update a backend database.   The value can be returned in IPN/PDT functions.   Note, the value will not appear in the email notification or the PayPal Screens however, the value will appear your Account Profile Transaction History details.

 

Regards,

 

skier

Login to Me Too

PhoneWipe
Contributor
Contributor

Thanks, skier. Yes, down-the-line I intend to integrate with IPN but at the moment I'm doing it manually.

 

I have downloaded the transaction history and, unfortunately, I still don't see the field. I do see a field titled "Custom Number" but it is blank. So is "Custom Number" supposed to hold the "Custom" variable? (If so, I have other issues, apparently.)

 

Thanks, again -Bradley

Login to Me Too

skier
Advisor
Advisor

Yes, what ever value you have for the "custom" variable, you should see.

 

Are you using "hosted" item button code meaning you're using the online button creator to generate your item button code?   If yes:,

 

Go to Step 3 and at the bottom you will see "Advanced Variables"
Note the text box near the bottom of the page. There you can insert extra variables.
For example, to insert the "custom" variable just enter:     custom=123456ABCD

There's no HTML extras, just the name of the variable, an equal sign and the value.

 

 

If you're manually coding your item buttton code, then the line of code you need would look like this:

<input type="hidden" name="custom" value="123456ABCD">

 

 

Regards,

 

skier

Login to Me Too

PhoneWipe
Contributor
Contributor

Umm, I was doing a cross of both. Bad idea? I was using a hosted button but I was also adding a hidden input field between the form tags. If I enter the variable as you said on the button creation page, eg 'custom=123456ABCD', am I creating a constant or would '123456ABCD' be a placeholder? And, if so, how do I dynamically change the value per transaction?

Login to Me Too
Solved

skier
Advisor
Advisor

Unfortunately, you can't add a line of code to a "hosted" item button after it has been created.   If you try, your code will be ignored.  That's the intent and design of "hosted" item button code which makes the code tamper proof.   If you want to use the "custom" variable with "hosted" code, you must include the variable and value in Step 3 of the button creation process. 

 

Regards,

 

 

skier

 

 

Login to Me Too

PhoneWipe
Contributor
Contributor

Gotcha. In reading other posts it looked like PayPal had created the option of including a "custom" input tag in conjunction with a hosted button. In further reading, it looks as if this is still in production.

 

A combination of the two would make sense because some fields have a greater need for tamper-proofing than others. I would still like to protect some fields while leaving the custom to be generated at run-time. Oh well, I guess a non-hosted button with manual tamper-checking is how I will implement for now.

 

Thanks for your help, skier

Login to Me Too

skier
Advisor
Advisor

No problem, if you need to dynamically change values in your item button code, you need to use clear text or non-hosted or non- encrypted item button code.   Check out my site here for tips and examples of clear text item button code.

 

Regards,

 

skier

Login to Me Too

PhoneWipe
Contributor
Contributor

@#$%!  Scratch that; not even a non-hosted button works. Why, PayPal, why?!!!!!!!!!!

Login to Me Too

JimW8
Member
Member

skier,

 

I have a campaign website, and state law now requires us to request donator's employer and occupation,

 

so, how would I do this using the custom field (since there are two of them) to post these 2 fields to paypal, then for this information to show up in my account history details?

 

can I do a custom1 and custom2 variable?

 

JimW

 

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.