doulong2782 2019-03-19 10:17
浏览 103

在PayPal中创建客户

I was working on PayPal and wanted to know some things about PayPal that we can do in Stripe through Golang API:

  1. can we create a customer through PayPal Go API and then attach card to it? Now What I have integrated is saved a card directly into PayPal vault and start transactions from the saved card. I have gone through the documentation of Go API and found no docs there about customer creation through API. PayPal API Docs
  2. When we fill card details, is it possible we return a card nonce/token from the PayPal api so that the token represents all the card info?
  3. Can I set a card to default card of the customer through PayPal Go API?

I need to know all of the above points through Go API. Can anyone guide me upon how can I do all of the above if is possible ??

  • 写回答

1条回答 默认 最新

  • dthdlv9777 2019-06-06 22:34
    关注

    From what I can gather you:

    Create the order with intent to CAPTURE

    POST /v2/checkout/orders
    {
        "intent": "CAPTURE",
        "purchase_units": [
        {
          "amount": {
            "currency_code": "USD",
            "value": "1.00"
          }
        }
      ]
    }
    

    Then CAPTURE the order

    POST /v2/checkout/orders/<OrderId>/capture
    {
        "payment_source": {
         "token": {
           "id": "VAULT CARD ID HERE",
           "type": "PAYMENT_METHOD_TOKEN"
         }
       }
    }
    

    This is as far as I have gotten because I am getting a 500 error currently

    评论

报告相同问题?

悬赏问题

  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探