GetVerifiedStatus from PayPal Adaptive Accounts Platform will do it for you.
There are no code samples or SDKs for Adaptive Accounts in Ruby in PayPal , but I found someone who wrote code for GetVerifiedStatus in Ruby .
The only change to this code that you would need to verify that it has an account is to change
if @xml['accountStatus']!=nil
account_status = @xml['accountStatus'][0]
if account_status.to_s() == "VERIFIED"
render :text => "Account verified"
else
render :text => "Oopsy! Yet to be verified"
end
else
render :text => "Gee! sorry! something went seriously wrong"
end
to
if @xml['accountType']!=nil
account_type = @xml['accountType'][0]
if account_type.to_s() == "Business"
render :text => "Business account!"
elseif account_type.to_s() == "Premier"
render :text => "Premier Account!"
elseif account_type.to_s() == "Personal"
render :text => "Personal account!"
else
render :text => "Account type not null but not a valid PayPal account type."
end
else
render :text => "Gee! sorry! something went seriously wrong"
end
: PayPal, , API, , 65-66, Adaptive .