简体   繁体   English

PayPal Java自适应链式未来付款

[英]PayPal java adaptive chained future payment

I want to use PayPal in android application, but because I think chained payments are too complex for PayPal android API I think better solution is to implement paypal in the web application and open that webpage in android webview. 我想在Android应用程序中使用PayPal,但是因为我认为链式付款对于PayPal android API太复杂了,所以我认为更好的解决方案是在Web应用程序中实现Paypal并在android webview中打开该网页。 I'm using java as backend. 我正在使用java作为后端。

here is the scenario: 这是场景:

From android application user can buy some product. 用户可以从android应用程序购买一些产品。 User complete the form and pay. 用户填写表格并付款。 The buyer is charged immediately, but seller doens't receive money until the buyer confirm that he receive the product. 立即向买方收费,但直到买方确认收到产品,卖方才收钱。 In the android application the seller receive notification that someone buy his product and send to the buyer. 在android应用程序中,卖方会收到有人购买产品并发送给买方的通知。 When buyer receive the product, he should confirm and call a web service from the backend and 95% of the money are released to the seller and 5% stay in my account. 当买方收到产品时,他应该确认并从后端调用网络服务,并且95%的钱将释放给卖方,而5%留在我的帐户中。

I'm little confused how everything in paypal works. 我有点困惑贝宝中的所有内容如何工作。 Can someone explain me the best solution for this scenario? 有人可以向我解释这种情况的最佳解决方案吗? I cannot find good examples of java chained delayed payment. 我找不到Java链式延迟付款的良好示例。

Thanks 谢谢

I don't have any Java samples specifically, but I can tell you that you'll use the Pay API to create the payment, and you'll set "actionType=PAY_PRIMARY" in the request parameters to specify that it will be a delayed chained payment. 我没有专门的Java示例,但是我可以告诉您,您将使用Pay API创建付款,并在请求参数中设置“ actionType = PAY_PRIMARY”以指定它将被延迟连锁支付。 The receivers should be setup with a primary receiver that would have the amount set to the full order amount (without any split) and then the secondary receiver would be set to the amount they should get once that portion is released. 接收方应设置有一个主接收方,该接收方的金额将设置为全订单金额(无任何分割),然后将辅助接收方设置为释放该部分后应获得的金额。

With that, the money will be sent to the primary receiver only, and the secondary receiver(s) will not get their money until you make a call to the ExecutePayment API . 这样,这笔钱将仅发送到主要接收者,而次要接收者将不会收到他们的钱,除非您调用ExecutePayment API That's what you would trigger when the buyer confirms they received their product. 这就是您在买家确认收到商品后触发的信息。

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

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