简体   繁体   English

贝宝自适应支付链式支付IPN php

[英]Paypal Adaptive Payments Chained Payment IPN php

I'm trying to adapt my standard IPN paypal payment to a Chained Payment to split the payment received into multiple receivers.Is it possible to create a Chained Payment by adding some hidden variables to the standard IPN form? 我正在尝试将我的标准IPN贝宝付款调整为链式付款,以将收到的付款拆分为多个接收者。是否可以通过向标准IPN表单中添加一些隐藏变量来创建链式付款?

This is the code i have: 这是我的代码:

$form="<form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">\n";    
$form.="<input type=\"hidden\" name=\"business\" value=\"".$this->order_info['account_name']."\"/>\n";
$form.="<input type=\"hidden\" name=\"cmd\" value=\"_xclick\"/>\n";
$form.="<input type=\"hidden\" name=\"amount\" value=\"".number_format($this->order_info['total_net_price'], 2)."\"/>\n";
$form.="<input type=\"hidden\" name=\"item_name\" value=\"".$this->order_info['transaction_name']."\"/>\n";
$form.="<input type=\"hidden\" name=\"item_number\" value=\"".$this->order_info['rooms_name']."\"/>\n";
$form.="<input type=\"hidden\" name=\"quantity\" value=\"1\"/>\n";
$form.="<input type=\"hidden\" name=\"tax\" value=\"".number_format($this->order_info['total_tax'], 2)."\"/>\n";
$form.="<input type=\"hidden\" name=\"shipping\" value=\"0.00\"/>\n";
$form.="<input type=\"hidden\" name=\"currency_code\" value=\"".$this->order_info['transaction_currency']."\"/>\n";
$form.="<input type=\"hidden\" name=\"no_shipping\" value=\"1\"/>\n";
$form.="<input type=\"hidden\" name=\"rm\" value=\"2\"/>\n";
$form.="<input type=\"hidden\" name=\"notify_url\" value=\"http://MY_DINAMIC_NOTIFY_URL\"/>\n";
$form.="<input type=\"hidden\" name=\"return\" value=\"http://MY_URL\"/>\n";
$form.="<input type=\"image\" src=\"https://www.paypal.com/en_US/i/btn/btn_paynow_SM.gif\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\">\n";
$form.="</form>\n";

From the IPN and PDT Variables page of Paypal ( IPN and PDT Variables ) 从Paypal的IPN和PDT变量页面( IPN和PDT变量

transaction[n].receiver
transaction[n].amount
transaction[n].is_primary_receiver

So I'm wondering if i can adapt my form with those values for splitting the payment or if i need to use the Preapproval system like the Paypal examples show. 所以我想知道我是否可以使用这些值来调整我的表格以拆分付款,或者是否需要使用如Paypal示例所示的预批准系统。

Any hint would be appreciated. 任何提示将不胜感激。

You wouldn't be able to adapt your form to use these addtional variables. 您将无法调整表单以使用这些附加变量。 You would have to use those variables with the actual Adaptive Payments (chained) API call. 您必须将这些变量与实际的Adaptive Payments(链接)API调用一起使用。 They wouldn't be able to be used for Website Payments Standard buttons. 它们将不能用于“网站付款标准”按钮。

You can't directly get the response of a chained payment. 您无法直接获得连锁支付的响应。 You must use the IPN (Instant Payment Notification) to get the payment details. 您必须使用IPN(即时付款通知)来获取付款详细信息。 Check this www.paypal.com/ipn 检查此www.paypal.com/ipn

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM