All data, you want to store in the session, has to be set in the "payment"-parameter.
If you design a multi-step-form, you have to care about some field dependencies: some fields should passed together to updateSession for a correct validation result:
- salutation, title, first_name, last_name
- address, post_code, city, country
- bank_fields, bank_account_owner, bank_account_number, bank_number, bank_iban, bank_bic, bank_confirmation
- credit_card_owner, credit_card_token, credit_card_expire_date_month, credit_card_expire_date_year, credit_card_number_hidden, credit_card_secure_id_hidden
Extra / unknown fields
You can only use the fields, that are available in the corresponding form. All fields, that are not known by the form, will cause an "extra form field" error. Remove such extra fields from your request or add the required field in the form configuration.
For example: if your request contains "interval=0", but the interval field is not part of the form, an error will occur.
There can be some special dependencies between fields, which are not immediately obvious:
- wants_receipt: a receipt requires the address of the donor, so there will be an error if no address is provided. We recommend to set the address as required fields in your form-settings or you should place this field together with the address-fields.
- wants_newsletter: to send a newsletter the email address of the donor is required, so there will be an error if no email address is provided. We recommend to set the email address as required field or you should place this field together with the email-address-field.
- amount and fb_item_id: if items have a minimum amount, you should query the item before or together with the amount.
- amount and payment_method: consider the minimum and maximum amounts of your payment methods set in your extensions settings in your FundraisingBox. We recommend to set the same min/max-amounts for all payment methods.
- interval and payment_method: not all payment methods are suitable for recurring payments. Please consider your form configuration to show or hide the available payment methods.
- payment_method and country: you can restrict the payment methods to selected countries in your extension-settings. Please consider your form configuration to show or hide the available payment methods. We recommend to query the address (with the country) before the payment method.
- payment_method and bank-data: you have to query the bank-data after or with the payment_method for correct validation.
If you are using the Adresslabor-extension, you should place the name- and address-fields in one step.
IP of donation
Credit card fields
Due to security requirements credit card fields are handled via iframes. We strongly recommend to use our Form-API to handle these fields. See Credit card data processing for further information.