gpt4 book ai didi

ruby-on-rails - 验证电子邮件地址是 Paypal 用户

转载 作者:数据小太阳 更新时间:2023-10-29 07:11:41 24 4
gpt4 key购买 nike

我想验证一个电子邮件地址是否是 PayPal 用户。是否有 API 调用来执行此操作?

是否有执行此操作的 ruby​​ 库?

谢谢

最佳答案

GetVerifiedStatus来自 PayPal's Adaptive Accounts平台会为您做这件事。

PayPal 没有任何 code samplesSDKs用于 Ruby 中的自适应帐户,但我确实找到了编写 code for GetVerifiedStatus in Ruby 的人.

您需要更改该代码以检查他们拥有的帐户类型的唯一更改是更改

if @xml['accountStatus']!=nil
account_status = @xml['accountStatus'][0]
#its pretty obvious from here init?
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

if @xml['accountType']!=nil
account_type = @xml['accountType'][0]
#its pretty obvious from here init?
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 引用页面,因此请使用 Adaptive Accounts guide 中第 65-66 页中包含的信息现在。

关于ruby-on-rails - 验证电子邮件地址是 Paypal 用户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10128979/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com