0

I have built a system with Paypal for a client however the client has now asked once a customer has made an order if an email can be sent to them and also the warehouse so they can start packaging it.

Just to make sure could this be achieved by adding another value in the html code like this:

<input type="hidden" name="business" value="email@address1.co.uk" value="email@address2.co.uk">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="item_name" value="Personal Built Board 27 Inch">
<input type="hidden" name="amount" value="44.50">

.... and so on

Dave
  • 121
  • 9

2 Answers2

0

Yes, it is possible, but you have to change the syntax like below.
Use [ ] in the field name to send multiple values:

<input type="hidden" name="your_field_name[]" value="1" />
<input type="hidden" name="your_field_name[]" value="2" />
<input type="hidden" name="your_field_name[]" value="3" />

You will get an array of values in the your_field_name field.
Refer this.

Community
  • 1
  • 1
Amaresh Narayanan
  • 4,159
  • 3
  • 20
  • 22
0

PayPal is a payments service, not an email service: the business identifies the recipient of the transaction (order, and eventually payment), and only incidentally who gets sent the email. You need to identify the (single) counterparty to the transaction in this 'business' field.

Also, PayPal recommends against using their emails for fulfillment activity, as there are too many ways for it to go wrong (emails can get spam filtered, misfiled, spoofed, etc).

The best practice for this sort of thing is to integrate PayPal's IPN service for secure notification of order placements. Your sytem would, upon receiving and verifying the IPN, send whatever notifications are required to various people or systems to initiate fulfillment (e.g., you send 2 different emails from the one IPN, if emails are what you want to use internally).

geewiz
  • 2,206
  • 1
  • 10
  • 16
  • Youre right the method below doesnt work... Can I achieve this my end? The client hasnt given me their login details just the 2 emails they wish the order to be sent to... – Dave Jul 13 '15 at 15:25
  • Google PayPal's IPN developer guide which includes sample IPN processors in several languages. Insert the code to send emails (or whatever you need to do) into the script in the block after the IPN is successfully verified. – geewiz Jul 13 '15 at 20:20