网站PayPal交易加密后签名验证失败问题求助
PayPal加密交易签名验证失败问题
我在网站上实现PayPal加密交易时遇到问题,测试使用的提交表单如下:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="myform"> <input type="hidden" name="cmd" value="_s-xclick" > <input type="hidden" name="cert_id" value="M..value..BD"> <input type="hidden" name="encrypted" value="-----BEGIN PKCS7----- MIIIEw..encrypted..ss q0cXhdT7fA== -----END PKCS7-----"> <input type="submit" value="send"> </form>
点击提交后,PayPal返回错误:
There was a problem verifying the signature of your secure order. Please contact your merchant.
补充说明:
- 未加密时交易可正常完成;
- 若加密提交但未包含业务邮箱,会返回另一个错误:
The email address for the business is not present in the encrypted blob. Please contact your merchant.
这表明我的消息可被解密但格式存在问题。我使用PHP手册中的demo_paypal_encrypt( $webform_hash )函数,传入的参数为:
$webform_hash = array("business"=>"fboh@hotmake.com", "amount"=> "10", "currency_code"=> "USD");
(实际使用的是我的真实邮箱,并非示例中的fboh@hotmake.com)
恳请各位专家指点问题所在。
内容的提问来源于stack exchange,提问作者Anwar Saiah
相关产品推荐
相关产品推荐

