From ebda1abec40f40580a7da1e511164f0ec77d7a62 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Wed, 18 Jan 2017 17:01:38 +0100 Subject: [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 --- addons/payment_stripe/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/payment_stripe/controllers') 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') -- cgit v1.2.3