|
Posted by Charlie King on 08/16/06 17:17
On Wed, 16 Aug 2006 17:14:21 +0200, in <ebvco8$5pm$1@ss408.t-com.hr>
(comp.lang.php) "B.r.K.o.N.j.A" <thebrkonja@inet.hr> wrote:
> Charlie King wrote:
> > I'm trying to send data to a remote script (a credit card processing
> > third party) from my site using POST.
> >
> > Currently, I'm doing it using the ususal form dynamically built with
> > my values.
> >
> > This is less than ideal because I want to perform local processing
> > (updating order status in the local database) and then to proceed to
> > the remote script, with resultant values, without relying on the user
> > pressing a [submit] button.
> >
> Did you tried to print the result of fsock function? if you get html as
> a result you can simply print it and user would get the desired page
> content and all the links there should work (if they are absolute ones,
> if not, you can tweak them a bit ... :))
I did, and I could print it, but, as you point out, all the relative
links are broken.
What I want to achieve is to actually send the user to the remote
site, exactly as though they had hit [submit] on a POST form.
The only problem with using a form is that I want to do some local
processing that is coincidental with their being sent off to the
payment site. I'd rather not have the possibility of loose ends
caused by their deciding not to press the button, and go play football
instead.
> Thing is, if you need to redirect to some outside page that displays
> something and let's user do something then I wouldn't update anything
> before user comes back from that particular page (what happens with the
> order if he changes his mind while he's away on that particular page).
In the case of this particular page, I get the user returned with a
'cancelled' or 'timed out' flag that I can process.
>I
> usually log that user xy has arrived on summary page (one before CC
> processing) and then when user successfully returns from third party,
> then I do the DB stuff.
If what I want to do turns out to be as difficult as it is looking,
then I may well have to do that :)
> Hope it helps a bit... :)
It does, thank you.
--
Charlie
Navigation:
[Reply to this message]
|