- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在开发一项服务,在该服务中,发件人支付一定金额,其中 95% 给一个收件人,5% 给另一个收件人。 (例如,支付 100 美元,初级费用减去 95 美元,二级费用减去 5 美元。)在这个例子中,发件人看到他要支付的金额是 95 美元,而不是 100 美元,我不明白为什么。
这是在与另一个 Paypal 电子邮件地址数组相对应的数组中设置金额的地方。
$receiverAmountArray = array(
.5*$backing_amount,
.95*$backing_amount
);
第二个电子邮件地址设置为主。最大金额的接收者必须是主要的。
$receiverPrimaryArray = array(
'false',
'true'
);
CallPay(来自 Paypal 的库)被称为:
$resArray = CallPay ($actionType, $cancelUrl, $returnUrl, $currencyCode, $receiverEmailArray,
$receiverAmountArray, $receiverPrimaryArray, $receiverInvoiceIdArray,
$feesPayer, $ipnNotificationUrl, $memo, $pin, $preapprovalKey,
$reverseAllParallelPaymentsOnError, $senderEmail, $trackingId
);
这是 CallPay 函数。抱歉长度:
function CallPay( $actionType, $cancelUrl, $returnUrl, $currencyCode, $receiverEmailArray, $receiverAmountArray,
$receiverPrimaryArray, $receiverInvoiceIdArray, $feesPayer, $ipnNotificationUrl,
$memo, $pin, $preapprovalKey, $reverseAllParallelPaymentsOnError, $senderEmail, $trackingId )
{
/* Gather the information to make the Pay call.
The variable nvpstr holds the name value pairs
*/
// required fields
$nvpstr = "actionType=" . urlencode($actionType) . "¤cyCode=" . urlencode($currencyCode);
$nvpstr .= "&returnUrl=" . urlencode($returnUrl) . "&cancelUrl=" . urlencode($cancelUrl);
if (0 != count($receiverAmountArray))
{
reset($receiverAmountArray);
while (list($key, $value) = each($receiverAmountArray))
{
if ("" != $value)
{
$nvpstr .= "&receiverList.receiver(" . $key . ").amount=" . urlencode($value);
}
}
}
if (0 != count($receiverEmailArray))
{
reset($receiverEmailArray);
while (list($key, $value) = each($receiverEmailArray))
{
if ("" != $value)
{
$nvpstr .= "&receiverList.receiver(" . $key . ").email=" . urlencode($value);
}
}
}
if (0 != count($receiverPrimaryArray))
{
reset($receiverPrimaryArray);
while (list($key, $value) = each($receiverPrimaryArray))
{
if ("" != $value)
{
$nvpstr = $nvpstr . "&receiverList.receiver(" . $key . ").primary=" . urlencode($value);
}
}
}
if (0 != count($receiverInvoiceIdArray))
{
reset($receiverInvoiceIdArray);
while (list($key, $value) = each($receiverInvoiceIdArray))
{
if ("" != $value)
{
$nvpstr = $nvpstr . "&receiverList.receiver(" . $key . ").invoiceId=" . urlencode($value);
}
}
}
// optional fields
if ("" != $feesPayer)
{
$nvpstr .= "&feesPayer=" . urlencode($feesPayer);
}
if ("" != $ipnNotificationUrl)
{
$nvpstr .= "&ipnNotificationUrl=" . urlencode($ipnNotificationUrl);
}
if ("" != $memo)
{
$nvpstr .= "&memo=" . urlencode($memo);
}
if ("" != $pin)
{
$nvpstr .= "&pin=" . urlencode($pin);
}
if ("" != $preapprovalKey)
{
$nvpstr .= "&preapprovalKey=" . urlencode($preapprovalKey);
}
if ("" != $reverseAllParallelPaymentsOnError)
{
$nvpstr .= "&reverseAllParallelPaymentsOnError=" . urlencode($reverseAllParallelPaymentsOnError);
}
if ("" != $senderEmail)
{
$nvpstr .= "&senderEmail=" . urlencode($senderEmail);
}
if ("" != $trackingId)
{
$nvpstr .= "&trackingId=" . urlencode($trackingId);
}
/* Make the Pay call to PayPal */
$resArray = hash_call("Pay", $nvpstr);
/* Return the response array */
return $resArray;
}
这是 $nvpstr 在调用之前的值。 Paypal是否可能只是将付款金额作为主要付款?这在链式支付的背景下没有意义。
actionType=PAY¤cyCode=USD&returnUrl=https%3A%2F%2F.com%2Fview_profile.php&cancelUrl=https%3A%2F%2Fexamplefunding.com%2Fview_profile.php&receiverList.receiver(0).amount=95&receiverList.receiver(1).amount=5&receiverList.receiver(0).email=recip_1334204171_biz%40example.com&receiverList.receiver(1).email=example_1334201682_biz%40example.com&receiverList.receiver(0).primary=true&receiverList.receiver(1).primary=false&receiverList.receiver(0).invoiceId=5c4e2902cbe484a0db37284f0144994c&receiverList.receiver(1).invoiceId=6f3d8ce65d1a59b41f8822ba6129ea58&feesPayer=PRIMARYRECEIVER&memo=New+Draft+Lines+-+ExampleFunding.com&senderEmail=paypal_1334201496_per%40example.com&trackingId=mqN8SSgIq
最佳答案
根据 Paypal's Adaptive Payments Documentation :
In a chained payment, the sender pays the primary receiver an amount, from which the primary receiver pays secondary receivers. The sender only knows about the primary receiver, not the secondary receivers.
因此,这是按预期工作的。为了将总金额的 5% 支付给辅助接收方,我必须更改此设置:
$receiverAmountArray = array(
.05*$backing_amount,
.95*$backing_amount
);
为此:
$receiverAmountArray = array(
.05*$backing_amount,
$backing_amount
);
我错误地认为总金额是数组中各个接收方金额的总和。
关于php - Paypal 自适应链式支付 - 发件人的金额是主要收款人的金额而不是总金额。怎么修?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10129627/
我不知道如何创建这样的元素,以便点之间的距离始终适应屏幕尺寸。 这是我的代码的结果: .line-list { display: flex; justify-content: space-be
最终用户的 paypal 自适应支付流程有点奇怪。 而不是像 paypal express 流程那样工作: 用户完成结帐过程 用户前往 paypal 以授权付款 用户被重定向回网站以确认付款 通知从网
我在我们的游戏网站上添加了一个响应式 Google 广告,这是一个简单的基于静态 bootstrap 的网站: http://dealoround.com这将解决 https://mrcsabatot
简短的问题 使用 routes.resetConfig(newRouteArray) 切换路线的/或更好的方法有什么区别? 对比 在 resize 事件上重新加载 Angular 应用程序并根据屏幕宽
我在尝试仅使用纯 JS 制作自适应 slider 时遇到一些问题。 任务是: 在移动设备中, slider 仅显示文本信息或大幻灯片的一小部分 当宽度增加(通过媒体查询)时, slider 会变大并显
我刚刚创建了一个表单类类型,它有一个选择类型,其中 choice_list 必须根据登录的用户角色进行更改,因此表单类类型需要访问当前用户角色,然后根据它更改 choice_list。 有人能指出一种
我刚刚创建了一个表单类类型,它有一个选择类型,其中 choice_list 必须根据登录的用户角色进行更改,因此表单类类型需要访问当前用户角色,然后根据它更改 choice_list。 有人能指出一种
引入自适应 Autosar 的主要动机是什么? Information provided by Autosar consortium is "AP provides mainly high-perfo
我是 Collection View 和自动布局的新手,我在让单元格大小适应模拟器中的各种设备时遇到了问题。我正在使用流式布局,并在尺寸检查器中设置尺寸。我提供的图像显示了我需要单元格在所有设备上的外
我在使用自适应布局的网站上工作,这意味着网站会适应用户屏幕宽度。有三张图片说明了我的想法,图片显示了浏览器窗口从宽到窄调整大小的三个步骤。 宽屏紫色区域贴在页面左侧,绿色区域适合屏幕的其余部分。 中等
目前我在 flexbox 中有三列(目前在 Plunkr 中的情况)。 当屏幕变小时,我希望第二列位于其他两列之上(Plunkr 中的理想情况)。 我在 https://plnkr.co/edit/Z
我试图让 svg 根据屏幕尺寸显示不同的图像,因此较小的设备显示较小的图像。例如,如果我想要一个覆盖整个 svg 区域的背景图像,就像这样: #t
这是我们的 jQuery 代码: $(document).ready(function(){ $(window).on("load resize", function(){ i
我正在尝试使用 this gem 用于使用 paypal 自适应支付,它需要 development: environment: "sandbox" username: "sandbox_userna
首先,我对 paypal 自适应支付有点陌生,直到现在我只使用 REST api。 在实现自适应支付时,我无法理解应用程序的完整流程。 在 REST api 中,我将用户导航到他付款的 paypal
我有一个具有聊天功能的应用程序,其中 UITextview 用于输入消息。 UITextview 高度必须是动态的(如果用户输入消息,高度必须根据文本长度更改,直到特定高度)。 我怎样才能做到这一点?
我有一个表设置了一个自动递增的 ID。假设我有 ID 1、2、3、4 和 5。当我删除 ID 号 3 时,我希望 ID 4 降为 3,ID 5 降为 4。 这可能吗?这是怎么做到的? 最佳答案 我想你
我有一个幻灯片,其中包含许多不同纵横比的图片。我希望图像在幻灯片中居中。我该怎么做,或者更好的是,我如何自动调整 slider 的大小? 最佳答案 解决中心问题 .bx-wrapper img {
我有一个想要实现的特定布局,但我不知道如何让它在多种屏幕尺寸上稳健地工作。 关键思想是 TextViews 中的信息很重要,而 ImageView 是装饰性的。我希望根据用户屏幕尺寸(最大尺寸)调整
我在响应式网站 ( http://goo.gl/asEovC ) 上运行了来自 labnol.org 的代码: ad = document.getElementById('google-a
我是一名优秀的程序员,十分优秀!