bitpay / ruby-client

Powerful, flexible, lightweight SDK for the BitPay Bitcoin Payment Gateway API.
MIT License
78 stars 64 forks source link

Exception: Not authorized for facade: pos #57

Open rana-ammir opened 7 years ago

rana-ammir commented 7 years ago

when I create_invoice this exception thrown. why and what's it solution? "Exception: Not authorized for facade: pos"

client = BitPay::SDK::Client.new(api_uri:'https://test.bitpay.com', pem: File.read('/home/pikessoft/projects/jinious/lib/bitpay.pem'), insecure: true ) @invoice = client.create_invoice(price: amount, currency: 'USD')

Error Message is: *** BitPay::BitPayError Exception: Not authorized for facade: pos

maikolb commented 6 years ago

Same error here. have you solved the problem ?

proprietary commented 6 years ago

You need to create/authorize another separate client with the "pos" role. You need to maintain two separate clients, one with a "merchant" authorization and one with a "pos" authorization.