Я интегрирую 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)}
}