Skip to content

Commit

Permalink
Fix payement for bancontact
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinetDenisAcsone committed Apr 22, 2022
1 parent 7009d04 commit cb5a7f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mozaik_membership_payment/controllers/portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def transaction(
}
if not partner_id: # ACS
# required field, not set if there is no partner
render_values["billing_partner_country"] = self.env.company.country_id
render_values["billing_partner_country"] = request.env.company.country_id
return acquirer.sudo().render(
tx.reference, float(amount), int(currency_id), values=render_values
)
5 changes: 5 additions & 0 deletions mozaik_membership_payment_stripe/models/payment_acquirer.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ def _stripe_request(self, url, data=False, method="POST"):
if data and "customer_email" in data and not data["customer_email"]:
data.pop("customer_email")
return super(PaymentAcquirer, self)._stripe_request(url, data, method)

def stripe_form_generate_values(self, tx_values):
if not tx_values.get("billing_partner_country"):
tx_values["billing_partner_country"] = self.env.user.company_id.country_id
return super(PaymentAcquirer, self).stripe_form_generate_values(tx_values)

0 comments on commit cb5a7f9

Please sign in to comment.