(no title)
thenduks | 11 years ago
Here's a snippet in Ruby I use to check. It's not perfect, but it catches a lot of cases:
# ...
def initialize
@request = PaypalAdaptive::Request.new
end
# ...
def verified_status( opts={} )
begin
opts.assert_keys! :first_name, :last_name, :paypal_account_email
result = @request.get_verified_status(
emailAddress: opts[:paypal_account_email],
firstName: opts[:first_name],
lastName: opts[:last_name],
matchCriteria: 'NAME'
)
Rails.logger.debug "PAYPAL VERIFICATION: #{result.inspect}"
return result.success? && result['accountStatus'] == 'VERIFIED'
rescue
return false
end
end
Here's the API docs: https://developer.paypal.com/docs/classic/api/adaptive-accou...What I can't stand is that accounts in some countries (at least India) can't send payments from balance. So you can't get your fee. This is mentioned nowhere in the docs, a customer just hit it one day and that's how I found out. I asked paypal what other countries can't send payments and they said... wait for it... they "don't have a list". I kid you not: https://twitter.com/rfunduk/status/412980259001102336
No comments yet.