3

我正在将 ActiveMerchant 集成到一个项目中,并且由于缺少 options 参数的文档而一次又一次地感到困惑。以以下为例,我在哪里可以找到 :payment 散列或 :payment_profile 散列应该采用什么形式/格式的信息。我在这里想念什么?

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)}
                                 }
4

0 回答 0