Forums / Basic Configuration / How to send a second email after paypal payment?

How to send a second email after paypal payment?

Views: 1,777

Results 1 to 2 of 2
27 Jan 2012, 11:29 AM
#1
ehm avatar

ehm

New Zenner

Join Date:
Apr 2008
Posts:
19
Plugin Contributions:
0

How to send a second email after paypal payment?

I'm using Zen Cart 139H with PayPal IPN (Basic PayPal service).

I'm selling information, so the user who buys something will receive a PDF file, that has a password on it.
Also I'm giving free PDFs that password are not required.

My issue is that when user buy a PDF and pay using paypal, he/she should receive the password for the PDF immediately, but I don't know how to do it.
I know how to change the paypal payment received email, but how to attached a password specific for that PDF the user bought?

The process is like this:

  1. user go to the zen cart and 'buy' a free pdf.
  2. The link is imedialty send to the user and he/she can donwload it.

or

  1. the user go and buy a PDF type A
  2. I have to manually check for it, and send to that user the password for the PDF A

or

  1. the user bo and buy a PDF type B
  2. I have to manually check for it, and send to that user the password for the PDF A

Is there any way I can automatic send the correct password for the PDF the user bought?

I'm only using Paypal as payment.

Thank you.

27 Jan 2012, 4:24 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: How to send a second email after paypal payment?

First, you will give your customers better experience if you use the PayPal Express Checkout module instead of the IPN module.

Second, you can trigger additional content to appear in the emails that the store sends, by intercepting the order process with custom code. Much like adding a software serial number to an order. This works easily when your customer is purchasing an item that they'll download from your site. ie: a downloadable product, not something you email to them after they buy.

So, set your products up as downloadable items, and your customers will receive a download link automatically.

Next, add your own custom code to issue a password/pin/serialnumber/whatever when the order email is generated.
Best to hook into the NOTIFY_ORDER_PROCESSING_ATTRIBUTES_EXIST notifier point, but there are other ways you could tackle the same thing.
There are several threads discussing this topic already, including these: www.zen-cart.com/forum/search.php?do=process&query=$custom_insertable_text plus others.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.