0

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.

DNDev1
  • 3
  • 2
  • 1
    This is Jason with PayPal. It looks like this property got removed when we updated the `CreditCard` object to reflect the current REST schema (we have internal scripts that take in the vault schemas to generate the .NET classes). We should never be removing properties, and the current state of the object is out-of-sync with the public documentation. The develop branch for the SDK has been updated to include this property again, and I've reached out to the API team to find out why this was removed. Thanks for bringing this to our attention. :) – Jason Z Dec 09 '14 at 00:00
  • Here's the link to the develop branch with the property added: https://github.com/paypal/PayPal-NET-SDK/blob/develop/Source/SDK/Api/CreditCard.cs#L72 – Jason Z Dec 09 '14 at 00:01

1 Answers1

0

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.

Jason Z
  • 854
  • 6
  • 15