简体   繁体   中英

Cannot assign a payer_id when saving a card to the vault

According to the rest api documentation it is recommended to assign a payer_id when saving a card to the vault.

My problem is that there is no payer_id property to populate for the creditCard object in the first place.

creditCard.number       = "4417119669820331";
creditCard.expire_month = "11";
creditCard.expire_year  = "2018";
creditCard.first_name   = "Joe";
creditCard.last_name    = "Shopper";
creditCard.type         = "visa";
**creditCard.payer_id = "123456789";**

As far as I am aware I am using the latest APIs updated by Nuget in VS2012.

Here's the response from the PayPal Vault API team:

The payer_id field was never removed. We've intended to deprecate/discourage its use because we determined that this field was misleading in the way it was named - it was being mistaken for a PayPal's internal identifier, where in reality, to PayPal, it was just an arbitrary string, intending to identify an externally managed customer id. The Vault team has since added a field named external_customer_id that better captures the intent.

The external_customer_id property (found here in the current version of the SDK) is what should be used instead. However, since the payer_id property will continue to be supported in the v1 version of the Vault REST services, the .NET SDK will continue to provide support for this (the upcoming v1.1 .NET SDK release will include it again).

The PayPal documentation team is working on getting the public documentation for the credit card object updated to include this information.


For future reference by other developers who may find this post, I'd like to add that if you do find a property missing from the PayPal .NET SDK, a better place to report this is to open an issue on the PayPal .NET SDK GitHub repository where the code for the SDK resides.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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