所以我已经将PayPal完全实现到我的系统中.该系统适用于用户'包',全部按设定价格计算.每个用户都有一个分配给他们的subscr_id(由PayPal设置),以及他们购买的包的详细信息.
我需要能够修改订阅,以便用户可以选择不同的包.基本上我只需要能够更改金额和"自定义"字段(这包含包裹详细信息,使用的优惠券等).
我会想到并希望,它会像向用户显示另一个带有隐藏字段的形式一样简单,其中包括'modify','subscr_id','custom'(新值)和'amount'(新值).不幸的是我无法在网上找到这个,而且PayPal的文档是如此单一,以至于我发现自己一圈一圈几个小时.
我的IPN都已设置好并且工作正常,我只需要构建一个表单,允许我将'amount'和'custom'变量设置为新的...我觉得这个位很容易!任何帮助是极大的赞赏.提前致谢.
我在WordPress网站上有一个订阅按钮(使用PayPal付款标准集成).
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="FRG9AB9A93MUN">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Premium Subscription">
<input type="hidden" name="item_number" value="321">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="rm" value="1">
<input type="hidden" name="return" value="http://example.com/success">
<input type="hidden" name="cancel_return" value="http://example.com/cancel">
<input type="hidden" name="src" value="1">
<input type="hidden" name="a3" value="299.00">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="M">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-SubscriptionsBF:btn_subscribeCC_LG.gif:NonHosted">
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_subscribeCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way …
Run Code Online (Sandbox Code Playgroud) 使用IPN模拟器时出现以下错误 -
IPN未发送,握手未经验证.请检查您的信息.
URL是非SSL HTTP(开发环境).
当我在浏览器中点击它时,我得到预期的输出(以及我的服务器access.log中的匹配条目),但是当我通过IPN模拟器点击它时,我得到上述错误,并且服务器访问日志中没有任何内容.
根据这些问题的建议:
我尝试了命令openssl s_client -connect api-3t.sandbox.paypal.com:443 -showcerts -CApath /etc/ssl/certs
并获得了他们建议的输出:
验证返回码:0(ok)
我不认为这特别重要,因为我没有尝试发出SSL请求.
还有其他想法吗?
我正在尝试将其作为错误修复的一部分,我在大约3周前开发了IPN的东西,而IPN模拟器只是简单地工作,现在不是那么多.
提前致谢.
我已在我的网站上实施了自适应付款.首先它是标准支付,所以我custom
在表格中传递一个参数,我在IPN中得到它.但我无法找到如何在自适应支付中传递此参数.
谢谢
我在我的Android应用程序中实现了PayPal,我希望将多个参数作为查询字符串发送到PayPal,并带有IPN URL.
例如
http://www.example.com/ipn/txnId=12&cartId=12
Run Code Online (Sandbox Code Playgroud)
但问题是当我使用此URL作为IPN URL PayPal给我一个错误.
我试过URLEncoding
但再没有成功付款.
如果我尝试单个参数它是有效的.
例
http://www.example.com/ipn/txnId=12
Run Code Online (Sandbox Code Playgroud)
我遇到过,贝宝是不能接受的问题&
,所以我试图替换字符串中的字符&
与&
和也\\&
,但它并没有帮助.
我知道我可以将多个参数设置为单个变量并将其传递给PayPal,但我想传递多个参数,如查询字符串.
如何让PayPal接受多个参数的付款?
编辑
目前我正在使用此代码进行编码URL但它失败了.
protected String addLocationToUrl(String url){
if(!url.endsWith("?"))
url += "?";
List<NameValuePair> params = new LinkedList<NameValuePair>();
params.add(new BasicNameValuePair("txnId", "45"));
params.add(new BasicNameValuePair("cartId", "34"));
String paramString = URLEncodedUtils.format(params, "utf-8");
url += paramString;
return url;
}
Run Code Online (Sandbox Code Playgroud) 我需要与交易相对应的买方交易ID,PayPal通过IPN通知我.我正在使用
$_POST['txn_id']
Run Code Online (Sandbox Code Playgroud)
但是这会存储卖方的交易ID,而不是买方的交易ID.同时,买方无法访问卖方的交易ID.
我理解PayPal分配两个不同的交易ID,但卖方需要存储买方交易ID,以便能够与用户就特定交易进行通信.
当PayPal向我的IPN脚本发送通知时,任何人都知道如何接收(或搜索)买方交易ID?
我只收到以下数据:
Array
(
[mc_gross] => 7.00
[protection_eligibility] => Ineligible
[payer_id] => F6912JHUIIHA
[tax] => 0.00
[payment_date] => 10:14:55 Sep 11, 2011 PDT
[payment_status] => Completed
[charset] => windows-1252
[first_name] => Name
[mc_fee] => 2.08
[notify_version] => 3.2
[custom] =>
[payer_status] => verified
[business] => myemail@gmail.com
[quantity] => 1
[verify_sign] => 123232jh4i32u4u3h5n435i43u5455645
[payer_email] => payermail@gmail.com
[txn_id] => 123u4324324yuy4574
[payment_type] => instant
[btn_id] => 35428120
[last_name] => lastname
[receiver_email] => receiver@gmail.com
[payment_fee] => 2.08
[shipping_discount] => 0.00 …
Run Code Online (Sandbox Code Playgroud) 我无法找到关于此的明确文件.
如果您使用paypal快速结账,当付款待处理时接下来会发生什么?
如果状态发生变化,PayPal会通过IPN向您发送更新,您有选择吗?
假设你做一个DoExpressCheckoutPayment(使用NVP),你得到这个:
&PAYMENTSTATUS=Pending
&PENDINGREASON= ECHECK //The payment is pending because it was made by an eCheck that has not yet cleared.
&REASONCODE=None
Run Code Online (Sandbox Code Playgroud)
所以你已经付款了,你想要等到它被清除?你接下来应该做什么
更新一些(外部文档)我发现只有sugest你可以使用(IPN?)处理待付款.
"如果快速结账付款PENDINGREASON回复是非零或已完成的回复,则付款正在等待.通常,这意味着客户已使用aneCheck付款.在这种情况下,资金不能保证,您不应该发货或提供的物品或服务,直到付款成功完成注:
PayPal建议您阻止eChecks作为付款方式,如果你无法tohandle挂起状态payments.To找出待处理的支付状态,您可以:提交查询交易.
使用PayPal Manager检查状态.有关详细信息,请参阅PayPal Manager在线帮助."
paypal沙盒似乎可以选择检查快速结账类型的IPN消息.DoExpressCheckoutPayment和IPN之间唯一的相关性(如果以这种方式使用)似乎可以使用"自定义"字段来跟踪待处理状态.DoExpressCheckoutPayment(nvp)中未给出txn_id(ipn).有人对这个有经验么?
我们计划更改我们服务的域名.因此,我们需要为现有客户更新IPN-url.我已经尝试使用Google搜索有关如何更改当前订阅的IPN-url的解决方案,但我一直无法找到任何内容.
任何帮助表示赞赏.
最好问候托马斯
我正在测试一个简单的paypal支付脚本,工作正常,但它没有调用我的notify_url,我不明白为什么.网址是可以访问的,甚至沙盒IPN测试也会得到肯定的结果.更奇怪的是,在同一个域上,我有一个其他脚本正在工作.代码不相同,但它使用相同的方法.
这是用于向Paypal发送paymento的表单的html:
form id="ppcheckout" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" name="pp">
<input type="hidden" value="_xclick" name="cmd">
<input id="business" type="hidden" value="xxx@gmail.com" name="business">
<input id="currency_code" type="hidden" value="EUR" name="currency_code">
<input type="hidden" value="http://www.mydomain.com/dir/ipn.php" name="notify_url">
<input id="return" type="hidden" value="http://www.mydomain.com/dir/" name="return">
<input id="cancel_return" type="hidden" value="http://www.mydomain.com/dir/" name="cancel_return">
<input type="hidden" value="1" name="amount">
<input type="hidden" value="Order from mysite" name="item_name">
<input type="hidden" value="1" name="invoice">
</form>
Run Code Online (Sandbox Code Playgroud)
无法弄清楚什么是错的或缺失的.有人有想法吗?
谢谢再见
我正在尝试为IPN(paypal)验证设置一个回调处理程序.我知道curl会做什么,但我不知道'cacert.pem'是什么(证书......?).
这是callback.php文件失败的地方(存在):
curl_setopt($ch, CURLOPT_CAINFO, 'cacert.pem');
if( !($res = curl_exec($ch)) ) {
echo ("Got " . curl_error($ch) . " when processing IPN data");
curl_close($ch);
exit;
}
curl_close($ch);
Run Code Online (Sandbox Code Playgroud)
出现以下错误消息:
设置证书验证位置时出错:CAfile:cacert.pem CApath:处理IPN数据时无
所以我下载了cacert.pem并复制到callback.php文件所在的目录.
这是上面代码之前的注释:
// In wamp like environments that do not come bundled with root authority certificates,
// please download 'cacert.pem' from "http://curl.haxx.se/docs/caextract.html" and set the directory path
// of the certificate as shown below.
Run Code Online (Sandbox Code Playgroud)
我正在使用XAMPP,这会是问题吗?
最后这是直接来自开发者页面的整个php文件:https: //www.x.com/developers/PayPal/documentation-tools/code-sample/216623
<?php
// STEP 1: Read POST data
// reading posted data from …
Run Code Online (Sandbox Code Playgroud) paypal ×10
paypal-ipn ×10
php ×3
android ×1
certificate ×1
codeigniter ×1
paypal-nvp ×1
verification ×1