Skip to content

Commit

Permalink
fix: change gcl customer payload (#2593)
Browse files Browse the repository at this point in the history
## Context

GCL payload needs to be fixed. All attributes need to be wrapped under
`payload`
  • Loading branch information
lovrocolic committed Sep 17, 2024
1 parent d9122b9 commit b2af725
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def create_gocardless_customer
family_name: customer.lastname.presence
}.compact

client.customers.create(customer_params)
client.customers.create(params: customer_params)
rescue GoCardlessPro::Error => e
deliver_error_webhook(e)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@
gocardless_service.create
expect(gocardless_customers_service).to have_received(:create).with(
hash_including(
email: customer.email,
company_name: customer.name,
given_name: customer.firstname,
family_name: customer.lastname
params: {
email: customer.email,
company_name: customer.name,
given_name: customer.firstname,
family_name: customer.lastname
}
)
)
end
Expand Down

0 comments on commit b2af725

Please sign in to comment.