Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting Faraday::Error::TimeoutError when creating card in Balanced gem

I am using the Balanced ruby gem in my rails app for payment integration.

I am submitting card information and getting valid response. Then I send card information to my controller and in that I am creating buyer using card_uri.

buyer = Balanced::Marketplace.my_marketplace.create_buyer(@member.email, card_uri)

but, I am getting this error:

Faraday::Error::TimeoutError (execution expired):

Can anyone tell me what's wrong? Thanks in advance.

like image 793
Kiran Chaudhari Avatar asked Oct 19 '12 12:10

Kiran Chaudhari


1 Answers

I've done some more digging in this issue, it could be that it's a transient network slowness. The settings are pretty strict for Faraday, so maybe we can loosen them up a bit.

When configuring Balanced, try this:

Balanced.configure('API_KEY_STRING', :connection_timeout => 30, 
                                     :read_timeout => 30)

Hope this helps.

like image 65
Mahmoud Abdelkader Avatar answered Nov 03 '22 22:11

Mahmoud Abdelkader