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