将Braintree Dropin集成到Android中的片段中时出错

时间:2017-06-13 22:19:35

标签: android braintree venmo

我在片段中需要Android集成的帮助,当代码在Activity中实现时工作正常,但在My Case中,我需要在片段中实现它。

我试图从片段中调用dropin ui但无法这样做。

我遵循的步骤: - 1)我使用get_braintree_token(rootview.getContext())获取了braintree标记。

2)获得令牌后我将其传递给onBraintreeSubmit(braintreeToken,viewb) 3)当它到达onBraintreeSubmit函数中的startActivityForResult()时,BrainTree UI不会膨胀。它直接移动到带有结果代码1和一些随机请求代码的onActivityResult()。 我在下面写了我的函数。

class Work < ApplicationRecord
  has_many :joined_tables, dependent: :destroy
  has_many :lists, -> { where(type: nil) }, through: :joined_tables, source: :listable, source_type: "List"
  has_many :shows, -> { where(type: "Show") }, through: :joined_tables, source: :listable, source_type: "List"
end

1 个答案:

答案 0 :(得分:0)

传递令牌值,这里传递Json响应,即创建问题,从响应中提取令牌并将其传递给braintree方法,而不是传递json响应。

相关问题