dsft8327 2015-01-16 16:12
浏览 51

在令牌在3小时内到期后1天后授权和处理付款

I'm using the paypal classic API to authorize and process a payment using Express Checkout (https://developer.paypal.com/docs/classic/express-checkout/ht_ec-singleAuthPayment-curl-etc/).

Although the authorization is valid for three days according to the documentation, the token expires within three hours.

So, how can I capture the transaction after the token has expired?

PS. I'm aware this is a duplicate of How am I supposed to capture a payment 1 day after its authorization if the PayPal token expires after 3 hours? but like the questioning user, the 'DoExpressCheckoutPayment' could be done after the three hour period.

  • 写回答

3条回答 默认 最新

  • duanmeng1950 2015-01-16 16:45
    关注

    Both the poster of the referenced question and you are making the same mistake in understanding the PayPal concepts.

    A token and an authorization are not the same thing at all. A token is a mechanism to connect a user agreement to an upcoming financial transaction; think of it as an extension to or part of a web session. A token describes an in-process action, and can be used to generate a financial transaction, but IS NOT a financial transaction itself.

    An authorization is one type of financial transaction that could be generated from that token/session. An authorization reserves funds from a buyer, thus giving the seller/receiver a guarantee that funds will be available from the buyer for a certain period of time. It does not actually move funds; that only happens when (if) a second financial transaction is executed in reference to the authorization: a "capture." In short, an authorization & capture split a "sale" into two pieces: one that ensures the transaction can occur, and a second that actually makes it happen.

    You should be executing DoExpressCheckout with paymentaction of "authorization" as soon as the user returns (well, perhaps after another page or two on your site... but not days later). Then you throw away the EC token and just keep the authorization #. The only action that you should be performing days later should be a capture, which only requires that authorization #.

    I'm guessing that fulfilling the customer's order in some fashion, either digitally or physically, is the cause of the delay before you capture.

    If you want to avoid holding funds in the customer's account, and are willing to accept some risk that the funds will therefore not be present when you go to capture, you could also use paymentaction of 'order' to do what amounts to a non-binding authorization at the time of the buyer's interaction.

    If you have a more complex situation, e.g. the amount is not known at the time of the user's interaction session, then rather than using an authorization you need to use a different PayPal product such as reference transactions/billing agreements/future payments that permit the user to grant you a more open-ended permission to bill them in the futur.

    评论

报告相同问题?

悬赏问题

  • ¥15 Mac系统vs code使用phpstudy如何配置debug来调试php
  • ¥15 目前主流的音乐软件,像网易云音乐,QQ音乐他们的前端和后台部分是用的什么技术实现的?求解!
  • ¥60 pb数据库修改与连接
  • ¥15 spss统计中二分类变量和有序变量的相关性分析可以用kendall相关分析吗?
  • ¥15 拟通过pc下指令到安卓系统,如果追求响应速度,尽可能无延迟,是不是用安卓模拟器会优于实体的安卓手机?如果是,可以快多少毫秒?
  • ¥20 神经网络Sequential name=sequential, built=False
  • ¥16 Qphython 用xlrd读取excel报错
  • ¥15 单片机学习顺序问题!!
  • ¥15 ikuai客户端多拨vpn,重启总是有个别重拨不上
  • ¥20 关于#anlogic#sdram#的问题,如何解决?(关键词-performance)