1

How is it possible to get orders from Expresso Store 2 to get Stripe to send email receipts as well as eh ones generated from Expresso?

There is no option to enable them as far as I can tell in Expresso. Is there a way to pass the parameter from the form to get email receipts as per the stripe docs?

https://support.stripe.com/questions/email-receipts

Many thanks,

Tom

1
  • In the end we've managed to convince the client that a generated invoice from our end is sufficient.
    – MrTomTom
    Jul 18 '15 at 20:19
1

There is not a setting in Store you would need to log into your Stripe account to enable their email to be sent for different actions. To do this you would need to do the following:

  1. Go to https://dashboard.stripe.com/account this should bring up the account modal if not click on your account name in the upper right corner.
  2. Click emails from the modal window on the right side.
  3. Check the boxes next to the emails you want Stripe to send to you and/or the customer on a completed order or refund.
  4. Save by clicking Done

After that Stripe will send out emails based upon your selection anytime an order is processed in Store.

Store has the ability to send out emails based upon order status, the benefit of sending the emails through Store over Stripe is that you have full control of the markup and you are able to use any and all EE custom fields, snippets, and most other add-ons. You can see more information about the email templates in the docs and you would want to use the orders tag pair to build you templates.

3
  • 1
    We've done this, the problem is when they are payments triggered from an API they don't seem to send. According to this article we need to pass a var to the API which I can't set without a bit of leg work. It's kind of a pain, would be better if there was just a option in Store to allow for it :( support.stripe.com/questions/email-receipts,
    – MrTomTom
    Jul 2 '15 at 3:00
  • 1
    I had a second to look for the actual file you would need to change it is /store/vendor/omnipay/stripe/src/Message/AuthorizeRequest.php around line 28 you would need to add something along the lines of $data['receipt_email'] = $this->getCard()->getEmail(); I have not tested this however. I still strongly believe that it is better to send the emails through Store instead of relying on the gateway to send receipts Jul 15 '15 at 0:02
  • Having said that passing that email will override any users default behaviors that they might have setup which is why I don't think the original Omnipay gateway does not do that and a pull request ( github.com/thephpleague/omnipay-stripe/pull/5 ) to do such was closed. Jul 15 '15 at 0:02
0

You could use the hook: store_transaction_update_end (shown here: https://www.exp-resso.com/docs/extension_hooks.html)

Once that hook is triggered, check if it was successful, if so, then supply the email and transaction ID as a request to the proper API call.

Also, I see that stripe uses JS to send the info to their form using the store module, maybe creating a hidden field receipt_email in the form that the JS gets the info from to send to Stripe will work as well.

1
  • 1
    The JS is just used to create the payment token as far as I am aware, so it's separate from from the transaction. I think the hook could be a good possibility though.
    – MrTomTom
    Jul 2 '15 at 3:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.