简体   繁体   English

贝宝休息api

[英]Paypal rest api

I have integrated PayPal REST API with PayPal SDK. 我已将PayPal REST API与PayPal SDK集成在一起。 It's working fine on sandbox when we are using sandbox credentials but when using live PayPal credentials, the save card functionality on PayPal (using REST API) is working fine, but when we try to make payments using the card id of PayPal (generated by PayPal like CARD-8K0630766A878805HYRGHBCD), We are facing an error like; 当我们使用沙盒凭证时,它在沙盒上正常工作但是当使用实时PayPal凭证时,PayPal上的保存卡功能(使用REST API)工作正常,但是当我们尝试使用PayPal的卡ID进行付款时(由PayPal生成)像CARD-8K0630766A878805HYRGHBCD),我们正面临一个错误;

    Exception: Got Http response code 401 when accessing https://api.paypal.com/v1/payments/payment. Retried 0 times.
    {
     "name":"UNAUTHORIZED_PAYMENT",
     "message":"Unauthorized payment",
     "information_link":"https://developer.paypal.com/webapps/developer/docs/api/#UNAUTHORIZED_PAYMENT",
     "debug_id":"3424fdf3dac86"
   }

We have done lot of R&D but could not get the issue. 我们已经做了很多研发,但无法解决问题。

Please let me know what we are missing or the mistake from our end so that the issue is resolved as soon as possible. 请告诉我们我们遗失的内容或我们最终的错误,以便尽快解决问题。

由于您的授权失败,您是否曾启用过您的实时凭据,因为它默认情况下未启用。

To switch Sandbox to Live, you need to change "mode" from "sandbox" to "live", and use Live client/secret pair. 要将Sandbox切换为Live,您需要将“mode”从“sandbox”更改为“live”,并使用Live client / secret对。 Any object/paypal-entities you have created using sandbox mode will no longer work, you have to re-create them using live credentials. 您使用沙盒模式创建的任何对象/ PayPal实体将不再起作用,您必须使用实时凭据重新创建它们。

  1. Go to: https://developer.paypal.com/developer/accountStatus#enableDCC 请访问: https//developer.paypal.com/developer/accountStatus#enableDCC
  2. Make sure Your "Direct credit cards" and "Future Payment" are enabled 确保启用“直接信用卡”和“未来付款”

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

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