Android 你收到付款了吗?

Android 你收到付款了吗?,android,stripe-payments,Android,Stripe Payments,我必须接受付款。因此,我的基本概念是,会有一些服务提供商和消费者。因此,消费者将能够预订服务,然后支付相同的费用。我已经实施了消费者端支付,现在我必须从消费者那里获得支付。因此,在服务提供商端,我需要配置接收付款的银行帐户 让我解释一下我将要遵循的步骤 按条带列出支持的银行 阻滞剂 1.1)我找不到在他们的文档中列出条带支持的银行的任何文档 选择任意银行,然后添加所选银行的凭证 为特定的应用程序保存令牌 验证帐户 从消费者那里获得报酬 Pl.如果我的理解中有任何缺陷,请帮助我克服这些障碍。让

我必须接受付款。因此,我的基本概念是,会有一些服务提供商和消费者。因此,消费者将能够预订服务,然后支付相同的费用。我已经实施了消费者端支付,现在我必须从消费者那里获得支付。因此,在服务提供商端,我需要配置接收付款的银行帐户

让我解释一下我将要遵循的步骤

  • 按条带列出支持的银行

    阻滞剂

    1.1)我找不到在他们的文档中列出条带支持的银行的任何文档

  • 选择任意银行,然后添加所选银行的凭证

  • 为特定的应用程序保存令牌

  • 验证帐户

  • 从消费者那里获得报酬


Pl.如果我的理解中有任何缺陷,请帮助我克服这些障碍。让我解释一下添加帐户以使用stripe接收付款的步骤。 有两种方法可以验证您的帐户

// Set your secret key: remember to change this to your live secret key in production
// See your keys here: https://dashboard.stripe.com/account/apikeys
Stripe.apiKey = "sk_test_BQokikJOvBiI2HlWgH4olfQ2";

// Get the bank token submitted by the form
String tokenID = request.getParameter("stripeToken");

// Create a Customer
Map<String, Object> customerParams = new HashMap<String, Object>();
customerParams.put("source", tokenID);
customerParams.put("description", "Example customer");

Customer customer = Customer.create(customerParams);
这里我将演示第二种解决方案

第一步

我们必须做的第一件事是收集用户帐户详细信息,以创建需要发送到服务器的条带令牌

设置令牌元数据

Map<String, Object> tokenParams = new HashMap<String, Object>();
Map<String, Object> bank_accountParams = new HashMap<String, Object>();
bank_accountParams.put("country", "US");
bank_accountParams.put("currency", "usd");
bank_accountParams.put("account_holder_name", "name");
bank_accountParams.put("account_holder_type", "individual");
bank_accountParams.put("routing_number", "number");
bank_accountParams.put("account_number", "a/c no");
tokenParams.put("bank_account", bank_accountParams);
将令牌id发送到服务器以供稍后验证

token.getId()
步骤2

接收代表令牌作为回报。一旦你有了它,就把它附加到你帐户中的一个客户上

// Set your secret key: remember to change this to your live secret key in production
// See your keys here: https://dashboard.stripe.com/account/apikeys
Stripe.apiKey = "sk_test_BQokikJOvBiI2HlWgH4olfQ2";

// Get the bank token submitted by the form
String tokenID = request.getParameter("stripeToken");

// Create a Customer
Map<String, Object> customerParams = new HashMap<String, Object>();
customerParams.put("source", tokenID);
customerParams.put("description", "Example customer");

Customer customer = Customer.create(customerParams);
//设置您的密钥:请记住在生产中将其更改为您的实时密钥
//请在此处查看您的钥匙:https://dashboard.stripe.com/account/apikeys
Stripe.apiKey=“sk_test_bkokikjovbiii2hlwgh4olfq2”;
//获取表单提交的银行令牌
字符串tokenID=request.getParameter(“stripeToken”);
//创建客户
Map customerParams=新HashMap();
customerParams.put(“源”,令牌ID);
customerParams.put(“说明”、“示例客户”);
Customer=Customer.create(customerParams);
将银行帐户添加到客户后,需要对其进行验证。当使用Stripe而不使用格子图案时,通过Stripe将自动发送的银行账户中的两笔小额存款进行验证。这些存款需要1-2个工作日才能显示在客户的在线对账单上。这些存款的对账单说明将进行验证。您的客户需要将这两笔存款的价值转告给您

接受这些值时,请务必注意,验证尝试失败的次数不超过10次。一旦超过此限制,银行账户将无法验证。仔细传达这些小额存款是什么以及如何使用它们可以帮助您的最终客户避免这个问题。获得这些值后,您可以验证银行帐户:

// Set your secret key: remember to change this to your live secret key in production
// See your keys here: https://dashboard.stripe.com/account/apikeys
Stripe.apiKey = "sk_test_BQokikJOvBiI2HlWgH4olfQ2";

// get the existing bank account
Customer customer = Customer.retrieve("cus_7iLOlPKxhQJ75a");
ExternalAccount source = customer.getSources().retrieve("ba_17SHwa2eZvKYlo2CUx7nphbZ");

// verify the account
Map params = new HashMap<String, Object>();
ArrayList amounts = new ArrayList();
amounts.add(32);
amounts.add(45);
params.put("amounts", amounts);
source.verify(params);
//设置您的密钥:请记住在生产中将其更改为您的实时密钥
//请在此处查看您的钥匙:https://dashboard.stripe.com/account/apikeys
Stripe.apiKey=“sk_test_bkokikjovbiii2hlwgh4olfq2”;
//获取现有的银行帐户
Customer=Customer.retrieve(“cus_7iLOlPKxhQJ75a”);
ExternalAccount source=customer.getSources().retrieve(“ba17shwa2ezvkylo2cux7nphbz”);
//核实帐户
Map params=新的HashMap();
ArrayList金额=新ArrayList();
增加(32);
增加(45);
参数卖出价(“金额”,金额);
来源。验证(参数);
一旦银行账户被核实,你就可以对其收费

参考文献


我认为他们会支持任何支持IBAN的银行(实际上应该是每家银行)。转到条带控制面板的传输页面。-谢谢你的指导:)