在重定向上发布到另一个站点 [英] POSTing to another site on redirect

查看:77
本文介绍了在重定向上发布到另一个站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好


我正在建立一个与PayPal联系的购物车。

在计算完邮费之后,我想要用户能够确认他们是否会注册时事通讯,然后才能获得
到Paypal。我想只需点击一下即可完成所有这些工作。


Paypal只允许你传递一个隐藏变量,我需要它来确定

顾客在后端的东西,所以付款后我不能查看

时事通讯。


我正在寻找一种方法处理表单输入自己,然后将用户发送给PayPal
。如何将POST数据添加到位置?标题?


虽然我可以通过将它们发送到执行

处理新闻稿的脚本来完成,然后使用javascript提交

使用post形成值(例如< body onload =" formname.submit();">)我是

试图保持javascript免费,所以它将100%可访问。


任何人都知道如何添加标题(或者有一个建议我还能怎么做

这样做)?


谢谢


Jim

解决方案

为什么不联合起来您传递给PayPal的

客户身份变量的分隔符和简报值。例如,如果

你正在通过12345为paypal,为什么不发送12345.y如果他们想要简报,只需在。中爆炸字符串。当你拿到它

回来?


Jim Evans写道:

Paypal只允许你传递一个隐藏的变量,我需要它来识别后端的客户,所以我不能在付款后检查
时事通讯的事情。


你是什么意思Paypal只让你传递一个隐藏的变量?


Paypal不知道你如何传递变量在你的表单中只要

它使用POST方法

我正在寻找一种方法来处理表单输入自己,然后发送给用户到PayPal。如何将POST数据添加到位置?标题?

虽然我可以通过将它们发送到执行
处理新闻稿的脚本来完成,然后使用javascript使用post提交
表单值(例如< body onload =" formname.submit();">)我是
试图保持javascript免费,所以它将100%可访问。




这是最简单的方法。如果你想确保它工作时

Javascript被禁用,请输入一些代码,基本上说哎呀...

提交给Paypal不起作用,请按''这里'再试一次。

''这里''是一个按钮,可以将隐藏的表格值发送给

Paypal。


Ken


" Ken Robinson" <柯****** @ rbnsn.com>在消息中写道

news:11 ********************** @ g43g2000cwa.googlegr oups.com ...

Jim Evans写道:

Paypal只允许你传递一个隐藏变量,我需要它来识别后端的客户,所以我可以付款后请查看
时事通讯。
你是什么意思Paypal只允许你传递一个隐藏的变量?

Paypal不知道你是怎么做的传递表单中的变量,只要它使用POST方法




PayPal处理的工作方式是向它发送信息,

然后它处理付款并使用

变量列表发回到您的网站。


事情是,它只包括某些变量 - 因此您需要的任何数据

在处理完付款后传回您的网站必须符合允许的变量列表。否则,它们就会被删除。


我正在寻找一种方法来处理表单输入,然后再发送<用户到PayPal。如何将POST数据添加到位置?标题?

虽然我可以通过将它们发送到执行
处理新闻稿的脚本来完成,然后使用javascript使用post提交
表单值(例如< body onload =" formname.submit();">)我是
试图保持javascript免费,所以它将100%可访问。




这里有一个想法:如何使用Session变量来设置值

" subscribe"在去PayPal之前(你可以在你自动的

转发页面中这样做而不使用JavaScript)并在他们返回时读取那个Session变量




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.

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?

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.

Anyone know how to add the headers (or have a suggestion how else I can
do this)?

Thanks

Jim

解决方案

why not concat some sort of delimiter and the newsletter value to the
customer identity variable you''re passing to paypal. for example, if
youre passing "12345" to paypal, why not send "12345.y" if they want
the newsletter and just explode the string at the "." when you get it
back?


Jim Evans wrote:

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.
What do you mean by "Paypal only lets you pass one hidden variable"?

Paypal has no idea how you pass the variables in your form as long as
it uses the POST methon

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?

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.



That''s the easiest way to do it. If you want to make sure it works when
Javascript is disabled, put in some code that basically says "Oops ...
submit to Paypal didn''t work, please press ''Here'' to try again". The
''Here'' would be a button that would send the hidden form values to
Paypal.

Ken


"Ken Robinson" <ke******@rbnsn.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...

Jim Evans wrote:

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.
What do you mean by "Paypal only lets you pass one hidden variable"?

Paypal has no idea how you pass the variables in your form as long as
it uses the POST methon



The way the PayPal processing works is that you send it the information,
then it processes the payment and posts BACK to your site with a list of
variables.

The thing is, it only includes certain variables - so any data you want
passed back to your site after the payment is processed must fit within the
list of variables that are allowed. Otherwise, they''re dropped.


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?

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.



Here''s a thought: What about using a Session variable to set the value of
"subscribe" before going to PayPal (you could do that in your automatically
forwarding page without using JavaScript) and read that Session variable
back when they return?



这篇关于在重定向上发布到另一个站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆