pariola / paystack

Paystack API wrapper
103 stars 42 forks source link

Bugfixes #4

Closed temiyemi closed 6 years ago

temiyemi commented 6 years ago

This fixes the remaining occurrences of Issue #1, and also introduces a proposed fix for Issue #3 by changing the order of params parsing, putting the highest priority on path/endpoint parameters and unsetting them from the data object so they don't also get passed unto the post body or query strings.

paystack.customer.update({ id: 'CUS_uvwxyz', first_name: 'John', last_name: 'Doe', phone: '+23412341234' })
  .then(body => console.log(body))
  .catch(err => console.error(err))

...works fine now with this fix.