yabacon / paystack-php

A PHP Wrapper for Paystack API - https://www.paystack.com
MIT License
109 stars 70 forks source link

Cannot call ->plan->fetch(planCode) #5

Closed neoighodaro closed 8 years ago

neoighodaro commented 8 years ago

Basically i think one should be able to call $paystack->plan->fetch() with a plan ID or code. This would keep the library consistent with the API. As opposed to $paystack->plan() which only accepts an integer value.

ibrahimlawal commented 8 years ago

Hi @neoighodaro. Thanks for the observation. I considered the shorter route better. But will update it to accept codes too.

ibrahimlawal commented 8 years ago

Hi @neoighodaro, I have done some updates that would provide $paystack->plan->fetch(3) as an alias for $paystack->plan(3) ; $paystack->plan->fetch('PLN_xxx') as an alias for $paystack->plan('PLN_xxx') and $paystack->plans() as alias for $paystack->plan->list() . Thanks for pointing it out.

Fixes #5