Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Validation

Jay edited this page Feb 26, 2015 · 4 revisions

We recently introduced a validation to determine if Model Object contains all the appropriate accessors (Getters and Setters) when converted from json response that we receive from Server. We use getter function's annotation to determine the type of the object it needs to be converted to. This allows us to map from JSON to PHP Objects with ease. For any missing accessor, it could be caused by two reasons:

  1. The APIs have been updated to provide new fields with new features. To resolve that, please update your SDK to latest version.
  2. The SDK is missing the accessor. Please let us know by creating an issue at https://github.com/paypal/PayPal-PHP-SDK/issues

Configurations

  • validation.level
    • Options : log, strict, disable
    • log : logs the error message to logger only (default)
    • strict : throws a php notice message. Please note that this could cause warning generating in future, as API introduces new fields
    • disable : disable the validation

If set to log, the warning message would be logged into your log.logFileName, for e.g.:

PayPal\Validation\ModelAccessorValidator: WARNING: Missing Accessor: PayPal\Api\Payment:setFirstName . Please let us know by creating an issue at https://github.com/paypal/PayPal-PHP-SDK/issues