有人使用过带有 SESSION 变量的 PayPal 网站支付标准吗?

发布于 2024-09-08 21:38:27 字数 675 浏览 3 评论 0原文

注意:我们的网站是用 PHP 构建的,并使用 MySQL 数据库。我已经使用 Authorize.net 管理另一个带有购物车的网站,因此请不要回复使用其他提供商的建议。我们发布的新产品/服务被商家提供商归类为“高风险”,他们希望向我们收取费用**。对此,我认为在 Paypal.com 上建立网站支付标准帐户是最好的选择,原因如下:

1) 没有月费,只需支付使用的费用

2) 信任品牌并且人们对 Paypal 感到满意

费率是比我们习惯的要高很多,但任何高风险商户帐户都是如此,所以这是无关紧要的。我遇到的问题是:

1)在我们网站的整个注册过程中,我们收集了大量的用户信息,并使用 SESSION 变量将其从一个页面传递到另一个页面。当您使用网站付款标准时,您被迫将消费者转至 Paypal 拥有的网页以提交其付款信息。成功完成后,他们能够将其引导回我们网站上的“确认”页面,但据我了解,没有办法保持旧的 SESSION 变量完好无损。这对我们来说非常重要,因为总体概念是仅在成功付款后才存储 SESSION 变量。

2) 使用网站支付标准,我无法找到发送支付金额变量的方法(一切都必须预先指定,即 T 恤是 2.99 美元)。我们的网站允许消费者注册多人,并为每个人提供多个“附加项目”,因此实际上有超过 100 种最终结帐金额的可能性。我不确定是否可以覆盖这个。

有没有人有幸在 Paypal 上使用网站支付标准并承认上述信息?

Note: Our site is built in PHP and uses MySQL databases. I already manage another site with shopping cart in its entirety using Authorize.net so please dont respond with suggestions to use another provider. A new product/service we are releasing is classified as "High Risk" to the merchant providers and they want to charge us out the a**. In response, I figured setting up a Website Payments Standard account on Paypal.com was the best alternative for the following reasons:

1) no monthly charges, only pay for what is used

2) trust brand and people are comfortable with Paypal

The rates are quite a bit higher than we are used to but any High Risk Merchant account is so that is irrelevant. The issue I am running into is this:

1) throughout the registration process on our site, we collect quite a bit of user information and pass it from page to page using SESSION variables. When you use Website Payments Standard, you are forced to pass the consumer off to a Paypal owned webpage to submit their payment information. Upon successful completion, they are able to direct them back to a 'confirmation' page on our site but it is my understanding there is NO way to keep the old SESSION variables in tact. This is very important to us because the overall concept is to store the SESSION variables ONLY after successful payment has been made.

2) Using Website Payments Standard, I am unable to find a way to send a Pay-Amount variable (everything must be dictated up front, i.e. T-shirt is $2.99). Our site allows the consumer to enrollee multiple persons and have several 'add-ons' for each person so there are literally over 100 end check out amount possibilities. I am not sure if it is possible to override this.

Has ANYBODY had luck using Website Payments Standard on Paypal acknowledging the information above?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

沙与沫 2024-09-15 21:38:27

1) 假设会话是基于 cookie 的,当他们返回您的网站时,它应该仍然存在(只要他们没有同时关闭浏览器窗口,这是不可能的)。

如果您确实不想确定,请将会话存储在数据库中与您生成的 order_id 关联的临时表中。我相信交易完成后这个(order_id)可能会被传回。阅读有关 PDT 的文档。

2)我相信事实并非如此。请查看文档第 250 页起。

1) Assuming the Session is cookie based, it should still be there when they come back to your site (as long as they havn't closed the browser window in the mean time which is unlikely).

If you really wan't to be sure, store the session in the database in a temp table associated with the order_id you're generating. I belive it's possible that this (order_id) is passed back after the transaction is completed. Read the docs on PDT.

2) I belive this is not the case. Check the docs page 250 onwards.

凡尘雨 2024-09-15 21:38:27

我的回答晚了几个月...但我也遇到了同样的问题...重定向到返回 URL 后丢失会话和 cookie。

对于那些遇到同样问题的人,这是我想出的解决方案,

在 paypal 表单中添加

<input type='hidden' name='return' value='".http_dir."shop/return.php'> 
<input type='hidden' name='custom' value='$session_id'>

$session_id = session_id( );

在 shop/return.php 中,我测试了它是否适用于

echo '<pre>';
print_r($_SESSION);
echo '</pre>';

echo '<pre>';
print_r($_COOKIE);
echo '</pre>';

echo '<pre>';
print_r($_GET);
echo '</pre>';

当您在表单中不包含“自定义”参数时,它将返回一个空数组。仅仅两条线就改变了一切,这太疯狂了。我以为我要重复整个购物车逻辑,天哪。

希望这会对将来的某人有所帮助...干杯^^

来源:WPS HTML 变量

I'm months too late for my answer... but I also had the same problem...losing sessions and cookies after redirection to the return url.

For those who will be encountering the same problem, here is the solution I came up with,

In the paypal form you add

<input type='hidden' name='return' value='".http_dir."shop/return.php'> 
<input type='hidden' name='custom' value='$session_id'>

where $session_id = session_id( );

and in shop/return.php, I tested if it works with

echo '<pre>';
print_r($_SESSION);
echo '</pre>';

echo '<pre>';
print_r($_COOKIE);
echo '</pre>';

echo '<pre>';
print_r($_GET);
echo '</pre>';

When you do not include 'custom' parameter in the form, it will return an empty array. It's crazy how just two lines change everything. I thought I was gonna repeat the whole shopping cart logic, oh boy.

Hope this would help someone in the future... Cheers^^

Source: WPS HTML Variables

仙气飘飘 2024-09-15 21:38:27

1.)我同意上面 Pete 的观点,您可能正在寻找 PDT 功能。听起来您最好的选择是消化发送到返回页面的 PDT 变量请求,然后构建会话变量。

2.) 您可以使用“amount”参数发送任何您想要的金额。 这是有关 PayPal HTML 参数的信息

1.)I agree with Pete above in that your probably looking for the PDT functionality. It sounds like your best bet would be do digest the request sent to your return page for the PDT variables and build your session variables then.

2.) You can send any amount you want using the "amount" parameter. Here's the info on PayPal's HTML parameters

紫﹏色ふ单纯 2024-09-15 21:38:27

应该回答问题2,关于问题1,我想补充一点,您可以像往常一样简单地使用PHP的内置Session功能(无论您使用哪种存储机制,可能是memcached,文件(默认),mysql数据库或其他),并将会话 ID 传递给 paypal。

当 paypal 回拨给您时,您可以使用 session_id($backpassed_sessionid_from_paypal) 访问您的会话变量,它只是加载与您传递到函数中的 sessionid 关联的会话数据,这可能就是您的意思。

Question 2 should be responded, regarding Question 1, I'd like to add that you can simply use the builtin Session functionality of PHP as usual (whichever Storing mechanism you have in place then, may it be memcached, file (default), mysql database or whatever), and pass the session id to paypal.

When paypal calls back to you, you can access your Session Variables by using session_id($backpassed_sessionid_from_paypal), which simply loads the session data associated with the sessionid you pass into the function, which is probably what you meant.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文