Customizing WooCommerce e-mail templates - templates

I have used WooCommerce before, but have never done much customization to it until recently.
I customized the e-mail templates to show the payment information, like transaction number, etc.
This works fine except for one thing.
Right now if a person pays with PayPal the process goes like this:
– order is placed, and is pending payment
– user goes to paypal and makes a payment
– PayPal IPN message is received, order is updated to "processing"
– email is sent to user
However this e-mail does not have the payment info in it. The variables are empty. If I re-send the same e-mail manually it works as expected. other automated e-mails that go out during the order process work fine, it's just that initial e-mail that's missing the information.
What I don’t get is why it's missing the first time, when the PayPal IPN is received, and the transaction info with it, before the e-mail is even sent.
Since the IPN is received before the e-mail is sent why is that info not in the e-mail? If I go to the order and re-send the “processing” e-mail it has the info that we want it to show.
Or maybe even a way to have PayPal orders automatically put "on hold" would work, then when I manually change the order status the e-mail would be sent with the correct information.

Related

Authorize.Net: How do I verify a hosted payment was successful once the user is redirected back to my site?

I am using the hosted form payment approach to accepting payments from users on my site. I dont see any examples of how to go about verifying the payment once the user is redirected back to my site. Here is how I'm trying to approach it:
Generate a token/form based on the cart
Post to the form url and send the user away
User returns to a verifying page
I have set up a webhook for all payment notifications
I receive the notification
?????
Verify the payment status and price are correct
Navigate the user away from the verifying screen to the next page
In step 6 all i have is the token that was generated for the transaction and the webhook doesnt provide that token back to me. How do I say "this transaction belongs to this user who is waiting to be verified"?
You can use the getTransactionDetailsRequest in their Transaction Reporting API to get the transaction details. The best place to put this information is in the refTransId field which is a value you can pass in as part of your transaction.

Authorize.Net hosted form: how to verify payment succeeded after redirect

I'm using the hosted payment form with getHostedPaymentPageRequest
After successful payment the browser opens by success url correctly.
However, i dont know how to verify that payment was actually completed. I have the token from getHostedPaymentPageRequest, but i cant find an API to call to get the result of that transaction.
I can see that when using an IFrame we can use the IFrameCommunicator, but we would prefer to not use that.
How can i verify the transaction succeeeded after redirect back from the hosted payment page?
If you don't use the iframe you won't get the results of the transaction in real time. Your best option then is to use a webhook to receive a notification of the successful payment. You can then get the transaction info using the transaction ID provided by the webhook. But that would mean the user won't know the status of their payment when they arrive back at your site. For that to happen you'd have to build a mechanism that does the above and have your receipt page poll your backend until it has the results of the transaction and then can display them to the user.

How to speed up auto return to my site after PayPal payment

I am creating a website through which people can buy tickets via paypal – I want to send a confirmation email once the payment is complete.
I already set up auto return.
My problem is that it takes too long to redirect – I'm afraid that the users will click off the page before it is redirected and before the email is sent.
Is there a way to make the process faster, i.e allow me to send the email as soon as the payment is confirmed?

How would I know that email has been sent or not via SendGrid in Django

I am working on django and sending emails to multiple users at once. in the given scenario it only tells me that if it has sent or not.
I want to display the report of same page that how many emails has sent to user successfully and how many not. more if i want to get details why email has failed to sent.
How would i do such things via SENDGRID APIs.
There are two options that I know of:
Connect to SendGrid Event Webhooks and start parsing events for every email to flag ones that were not sent. I believe you can configure SendGrid to only send certain events, so if you're interested in bounces you don't need to worry about handling all events.
The second option is to use a service like sendwithus which will connect to your SendGrid account on your behalf and track all bounces/opens/clicks for you and provide a simpler API/UI to view the data. I believe they do this via SendGrid's webhooks, so it's effectively the same solution but written for you.
Happy to elaborate on either, I've used both before.

Not receiving any emails

I am using opencart 1.5.1 and I am testing the emails that are being sent when customers place orders.
I have gone into the admin and made sure that I have entered a valid Store Email, made sure that New Order Alert Mail: is set to Yes.
Whenever I make an order (I am using Barclays ePDQ) I place the order, but as a customer I receive no order email. The store owner also doesn't seem to be sent.
I get nothing in the error.log file system/log I also have nothing in the vqmod.log file.
I am completely stumped as to why these emails are not sending.
I have checked the spam folders of both the customer and the store owner.
Looking at the maillog on the server, there are no records suggesting the email has been sent (this could be why the emails are not being received), but this doesn't explain why the emails are simply not being sent.
The order is listed in admin under Sales->Orders, just no emails.
Thanks
Has anyone ever come across this before?
Make sure in Plesk when setting up/editting a domain that under PHP Support, make sure that safe_mode is left unchecked.
This will cause nothing but complete frustration.