我正在将ActiveMerchant集成到一个项目中,并且由于缺少options参数的文档而一遍又一遍地神秘化。以下面的示例为例,我在哪里可以找到以下形式/格式的信息:payment hash或:payment_profile hash应该采用的方式。我在这里缺少什么?
create_customer_payment_profile(options)
Creates a new customer payment profile for an existing customer profile.
Options
:customer_profile_id — The Customer Profile ID of the customer the payment profile will be added to. (REQUIRED)
:payment_profile — A hash containing the elements of the new payment profile (REQUIRED)
Payment Profile
:payment — A hash containing information on payment. Either :credit_card or :bank_account (REQUIRED)
我在某人的博客上发现了以下内容,我想知道如何从ActiveMerchant上的稀疏文档中推断出所有这些内容。此外,在文档中的任何地方都没有提到bill_to,并且下面似乎不完整:
@profile = {:customer_profile_id => self.user.customer_cim_id,
:payment_profile => {:bill_to => self.address,
:payment => {:credit_card => CreditCard.new(self.credit_card)}
}