diff options
| author | Martin Trigaux <mat@odoo.com> | 2017-01-18 17:01:38 +0100 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2017-01-19 13:34:58 +0100 |
| commit | ebda1abec40f40580a7da1e511164f0ec77d7a62 (patch) | |
| tree | 94d76b5857576086a231037c47cd26ac9bb3c49a /addons/payment_stripe/controllers/main.py | |
| parent | 6169018c33705d2c591c402761e5f9ac9b36ce55 (diff) | |
[IMP] stripe: add receipt_email to the order
The email of the recipient must be specified in the charge.
The checkout.js prompt creates a token with the email specified as the name but
to get an email confirmation that the charge succeeded, the receipt_email
parameter must be set.
Side note: the receipt_email is not enough to send email confirmation, it must
also be enabled on Stripe dashboard that generated the access tokens.
Reference: https://support.stripe.com/questions/email-receipts
opw-697759
Diffstat (limited to 'addons/payment_stripe/controllers/main.py')
| -rw-r--r-- | addons/payment_stripe/controllers/main.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/payment_stripe/controllers/main.py b/addons/payment_stripe/controllers/main.py index ceebb17e500..b4627157a9e 100644 --- a/addons/payment_stripe/controllers/main.py +++ b/addons/payment_stripe/controllers/main.py @@ -32,7 +32,7 @@ class StripeController(http.Controller): tx = request.env['payment.transaction'].sudo().browse( int(request.session.get('sale_transaction_id') or request.session.get('website_payment_tx_id', False)) ) - response = tx._create_stripe_charge(tokenid=post['tokenid']) + response = tx._create_stripe_charge(tokenid=post['tokenid'], email=post['email']) _logger.info('Stripe: entering form_feedback with post data %s', pprint.pformat(response)) if response: request.env['payment.transaction'].sudo().form_feedback(response, 'stripe') |
