Ability to pass custom fields to payment request #43
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've implemented the ability to pass custom fields to instant payment requests. Initially, I created a branch to implement the
NOSHIPPING
option, but after reading the API documentation (https://www.x.com/sites/default/files/pp_nvpapi_developerguide.pdf, warning, it's huge) I noticed there were about 10 fields I wanted to use but weren't implemented yet.Having the ability to pass custom fields adhoc to the request would be more error prone, but also means this gem can support the whole API (including updates) without having to manually implement every field.
Added a
:custom_fields
hash to thePaypal::Payment::Request
attributes. Implemented with this is replacement of lower casen
in field names with the current index (lower casen
is the standard for indexed values in the doc). Updated spec to test custom fields.If you don't think this fits, please close the pull request, I'll be able to keep using this for my own stuff by referencing my repo.
Mick