balanced / balanced-ruby

Balanced API library in ruby.
MIT License
111 stars 47 forks source link

Unable to fetch previously created Customer #206

Closed adnankhantech closed 9 years ago

adnankhantech commented 9 years ago

I have created customer resource and save the customer href inside my database.I'm trying to find the existing customers as:

Balanced::Customer.fetch(self.balanced_uri)

where self.balanced_uri is the customer.href But it gives me this error:

Balanced::Forbidden: Balanced::Forbidden(403)::Forbidden:: GET https://api.balancedpayments.com/customers/CU4dGEmvVcmbqikQhhZvohc4: not-authorized: You cannot access customer CU4dGEmvVcmbqikQhhZvohc4 Your request id is OHM5e1c8b109fe611e4940e0230f00c9248. 
mjallday commented 9 years ago

@adnan87 you're using the API key associated with "TEST-MP1bo5fDFQ2z4mjksd8ki64E" to fetch the customer, it was created under marketplace "TEST-MP13ZcrWilidn4G0O0cZ0GhL"

adnankhantech commented 9 years ago

@mjallday thanks a lot for your input, it worked!!!. The issue was the customer.href which I was using was of the a different env stored previously inside my database. Thanks again :+1: