简体   繁体   English

为什么要使用客户/买方API凭据?

[英]Why use Customer/Buyer API credentials?

I'm integrating PayPal into a client's website for the first time. 我是第一次将PayPal集成到客户的网站中。 I've been using seller and buyer test accounts and testing on Sandbox. 我一直在使用买卖双方的测试帐户,并在Sandbox上进行测试。 I've used the seller's API credentials in creating Buy Now buttons dynamically, and these credentials are used in the NVP that goes through cURL. 我在动态创建“立即购买”按钮时使用了卖方的API凭据,并且这些凭据在通过cURL的NVP中使用。 I'm also using the credentials in the IPN listener that does the business logic once a buyer makes a payment. 我还使用了IPN侦听器中的凭据,一旦买家付款,该凭据就会执行业务逻辑。

I've tested being a buyer who buys using a PayPal account and I've also tested buying the product using credit cards. 我已经测试过使用PayPal帐户进行购买的买家,并且还测试过使用信用卡购买产品。

  1. I'm just wondering, why do we need the buyer's API credentials? 我只是想知道,为什么我们需要买方的API凭证? Are there are some important tests I'm missing out where these credentials are used to make API calls? 是否有一些重要的测试遗漏了这些凭证用于进行API调用的地方?

  2. How can I create errors in order to take advantage of "Negative" testing, which is an option that shows up if I click on the "Profile" of one of the test sandbox accounts in the new developer interface? 我如何创建错误以利用“负面”测试,如果我在新的开发人员界面中单击其中一个测试沙箱帐户的“个人资料”,则会显示此选项?

I know some of these questions can be answered by looking at paypal's developer site, and I've been through its site pages over and over again, I'm asking here on SO because while PayPal is comprehensive, I don't find it clear enough for a beginner like me. 我知道其中一些问题可以通过查看贝宝的开发人员站点来回答,而且我已经一遍又一遍地浏览其站点页面,所以我在这里是这样问的,因为尽管贝宝功能全面,但我不清楚对于像我这样的初学者来说足够了。

To answer your questions. 回答您的问题。

  1. These credentials are what allow you to access the account via API call. 这些凭据使您可以通过API调用访问帐户。 It's an authentication method similar to using a user id and password for accessing the account, performing actions on the account and retrieving information from the account. 这是一种身份验证方法,类似于使用用户ID和密码来访问帐户,对帐户执行操作并从帐户中检索信息。 You would not want just anyone to be able to access your account, so API credentials are used for accessing your account. 您不希望任何人都能访问您的帐户,因此使用API​​凭据访问您的帐户。
  2. If you are wanting to use negative testing, refer to the developers guide. 如果要使用负面测试,请参阅开发人员指南。 This will tell you want you need to pass to trigger specific error codes. 这将告诉您您需要通过触发特定的错误代码。 Passing different values for such things as amount, cvv2, the address and etc will trigger different errors. 为数量,cvv2,地址等传递不同的值将触发不同的错误。 As for triggering errors on the profile, you wouldn't be able to do this with negative testing, if this is what you are asking. 至于触发配置文件中的错误,如果您要的是负测试,您将无法做到这一点。

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

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