At this time, Finix does not have an auto-fund feature. Clients have utilized a script similar to the one below to approve settlements automatically via a cron job:
require 'finix'
require 'byebug'
Finix.configure(
:root_url => 'HOST',
:user=>'USERNAME',
:password => 'PASSWORD'
)
merchants = Finix::Merchant.retrieve
byebug
merchants.each do |merchant|
begin
identity = Finix::Identity.retrieve(:id=>merchant.identity)
settlement = identity.create_settlement(
{
"currency"=> "USD"
})
rescue Exception => e
puts e.errors
end
end
Comments
0 comments
Please sign in to leave a comment.