Skip to content

Attach billing address to transactions #31

@xxswingxx

Description

@xxswingxx

According to this docs: https://developers.paymill.com/guides/reference/address-data, it shold be possible to attach a billing address to a transaction but so far it raises ArgumentError whenever I try it. If I remove the billing_address, the transaction can be created as expected. The code I've been testing is something like this:

    customer = Paymill::Client.find(CUSTOMER_ID)
    payment = Paymill::Payment.create(token: params[:card_token], client: customer)

    charge = {
      payment: payment,
      amount: 1000
      currency: 'USD'
      billing_address: {
        name: 'Max Mustermann',
        street_address: 'Musterstr. 1',
        street_address_addition: '',
        city: 'Munich',
        state: 'Bavaria',
        postal_code: '80333',
        country: 'DE',
        phone: '+4989123456'
      }
    }

   transaction = Paymill::Transaction.create(charge_attributes) #=> raises ArgumentError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions