|
Posted by Jim Evans on 06/08/05 01:38
Thanks Tony and Kimmo
I'm being awkward and trying to avoid having to ask the visitor about
the newsletter until after they've done the postage. I only want them to
click once, and be taken straight to Paypal. That means I wouldn't be
able to do any processing on it, such as concatenating or putting it
into an array.
I don't want the customer to see anything confusing - they'll be getting
a breakdown of the cart contents in their paypal account so I can only
use the paypal "custom" value, (which is never shown to the customer) to
identify them in the IPN.
Paypal works with GET, but if I pass more than a couple of cart items,
plus the customer details, I'll run out of characters in the GET string.
I hadn't really thought about asking on the paypal forums, as I was just
looking at the PHP prblem of passing the POST stuff - but I guess that's
going to have to be my next step.
Thanks guys.
Tony wrote:
> "Jim Evans" <longhairedjim@ntlworld.com> wrote in message
> news:66ipe.3373$1O3.1378@newsfe5-win.ntli.net...
>
>>Hi All
>>
>>I'm building a shopping cart that ties in with PayPal for payments. After
>>working out the postage charge, I want the user to be able to confirm if
>>they'll sign up to a newsletter or not, and then to be taken to Paypal.
>>I'd like to do all that with just one click.
>>
>>Paypal only lets you pass one hidden variable, and I need that to identify
>>the customer in the back end stuff, so I can't check on the newsletter
>>thing after payment.
>
>
> PayPal allows for two hidden variables - are you using them all for options?
>
> As an alternative, would it be possible to include the required data along
> with the customer ID info? I'm guessing that this is info that is passed
> back to you after processing, right? So, let's say it was a hidden field -
> you could do something like: (I'm fudging the form name, since I don't
> remember the PayPal names offhand)
>
> print "<input type='hidden' name='paypaloption1'
> value='$customerID/subscribe-$subscribe'>\n";
>
> Of course, you would have to get the $customerID and $subscribe info in a
> previous field to do this.
>
>
>>I'm looking for a way to process the form input myself, before sending the
>>user to PayPal. How can I add POST data to a "Location" header?
>
>
> I don't think you can add POST data, but you can certainly add GET data.
> Have you tried PayPal with GET? I am under the impression that should work,
> from what I've done with PayPal before.
>
> Since this is PayPal specific, have you asked on the PayPal Developers
> Forum?
>
>
>>Although I could do it by sending them to a script that does the
>>processing for the newsletter, and then uses javascript to submit the form
>>values using post (e.g. <body onload="formname.submit();">) I'm trying to
>>keep it javascript free, so it'll be 100% accessible.
>
>
> Alternately, you could add a "continue" button with all the data in hidden
> fields, for those who don't have JavaScript enabled.
>
> Just some thoughts - maybe they'll give you an idea.
>
>
[Back to original message]
|