【问题标题】:Paypal Authorization throws: Can not access to this resourcePaypal 授权抛出:无法访问此资源
【发布时间】:2017-11-07 11:55:01
【问题描述】:

我在 Paypal Marketplace 工作。我想为我的账户(合作伙伴账户)创建一个商家(卖家账户)。但是当我调用 POST https://api.sandbox.paypal.com/v1/customer/partner-referrals API 时,它会抛出 AUTHORIZATION_ERROR: You are not allowed to access this resource。我通过生成它在 Header 中传递了一个令牌https://api.sandbox.paypal.com/v1/oauth2/token

下面是我使用 Postman 传递的数据:

{
  "customer_data": {
  "customer_type": "MERCHANT",
  "person_details": {
    "email_address": "mca.dipak-facilitator@gmail.com",
    "name": {
    "prefix": "Mrs.",
    "given_name":"Dipak",
    "surname": "Bhalodiya",
    "middle_name": "Prakash"
    },
    "phone_contacts": [
    {
      "phone_number_details": {
      "country_code": "91",
      "national_number": "8585868489"
      },
      "phone_type": "HOME"
    }
    ],
    "home_address": {
    "line1": "11, outer ring road",
    "state": "Karnataka",
    "city": "Bangalore",
    "country_code": "US",
    "postal_code": "560103"
    },
    "date_of_birth": {
    "event_type": "BIRTH",
    "event_date": "1987-12-29T23:59:59.999Z"
    },
    "nationality_country_code": "US",
    "identity_documents": [
    {
      "type": "SOCIAL_SECURITY_NUMBER",
      "value": "ABCDEF34646",
      "partial_value": false,
      "issuer_country_code": "US"
    }
    ]
  },
  "business_details": {
    "phone_contacts": [
    {
      "phone_number_details": {
      "country_code": "91",
      "national_number": "9740216087"
      },
      "phone_type": "FAX"
    }
    ],
    "business_address": {
    "line1": "11, outer ring road",
    "state": "Karnataka",
    "city": "Bangalore",
    "country_code": "US",
    "postal_code": "560103"
    },
    "business_type": "PROPRIETORSHIP",
    "category": "1004",
    "sub_category": "2025",
    "names": [
    {
      "type": "LEGAL",
      "name": "DIPAK STORE"
    }
    ],
    "business_description": "Arts and handicrafts",
    "event_dates": [
    {
      "event_type": "ESTABLISHED",
      "event_date": "2009-01-31T13:59:45Z"
    }
    ],
    "website_urls": [
    "https://www.skyproductivity.com"
    ],
    "annual_sales_volume_range": {
    "minimum_amount": {
        "value": "2000",
        "currency": "USD"
    },
    "maximum_amount": {
        "value": "3000",
        "currency": "USD"
    }
    },
    "average_monthly_volume_range": {
        "minimum_amount": {
        "value": "2000",
        "currency": "USD"
    },
    "maximum_amount": {
        "value": "3000",
        "currency": "USD"
    }
    },
    "identity_documents": [
    {
      "type": "TAX_IDENTIFICATION_NUMBER",
      "value": "ABCDEF34646",
      "partial_value": false,
      "issuer_country_code": "US"
    }
    ],
    "email_contacts": [
    {
      "email_address": "customer-service@example.com",
      "role": "CUSTOMER_SERVICE"
    }
    ]
  },
  "financial_instrument_data": {
    "bank_details": [
        {
          "nick_name": "Bank of America",
          "account_number": "130385868974",
          "account_type": "CHECKING",
          "currency_code": "USD",
          "identifiers": [
              {
            "type": "ROUTING_NUMBER_1",
            "value": "325272063"
            }
          ]
        }
    ]
  },
  "preferred_language_code": "en_US",
  "primary_currency_code": "USD",
  "referral_user_payer_id": {
    "type": "PAYER_ID",
    "value": "2281707"
  },
  "partner_specific_identifiers": [
    {
    "type": "TRACKING_ID",
    "value": "130370723501"
    }
  ]
  },
  "requested_capabilities": [
  {
    "capability": "API_INTEGRATION",
  "api_integration_preference": {
    "partner_id": "2281707", //My own Partner Id
    "rest_api_integration": {
      "integration_method": "PAYPAL",
      "integration_type": "THIRD_PARTY"
    },
    "rest_third_party_details": {
      "partner_client_id": "My Test Account Client ID", //My Client ID of Test Account
      "feature_list": [
        "PAYMENT",
        "REFUND"
      ]
    }
  }
  }
  ],
  "web_experience_preference": {
  "partner_logo_url": "https://www.example.com/logo/",
  "return_url": "http://localhost/skyinvoice/htdocs/",
  "action_renewal_url": "http://localhost/skyinvoice/htdocs/"
  },
  "collected_consents": [
  {
    "type": "SHARE_DATA_CONSENT",
    "granted": true
  }
  ],
  "products": [
  "EXPRESS_CHECKOUT"
  ]
}

【问题讨论】:

    标签: php paypal-sandbox paypal-marketplaces


    【解决方案1】:

    PayPal Marketplaces 是限量发行产品,仅适用于经批准的商家。因此他们授予您客户端 ID 的权限,以便在您的沙盒环境中使用 API。因此,我想建议,如果您遇到上述错误,请发送邮件至 paypal。

    【讨论】:

    • @BandishDave 您已经在您的测试帐户中获得了它。它会在那里。
    • 感谢您重播我...。请给我一个特定的菜单,我可以在其中获取合作伙伴和跟踪 ID 吗?...因为我在我的测试帐户中找不到任何地方。
    • @mayurpanchal 是的,您可以在您的沙盒帐户上进行测试。
    猜你喜欢
    • 2018-11-10
    • 2021-02-15
    • 2018-10-11
    • 1970-01-01
    • 2018-05-16
    • 2016-12-24
    • 2021-05-19
    • 2014-12-12
    • 2020-07-05
    相关资源
    最近更新 更多