当我从PayPal收到订单时,无法再发送自动回复

时间:2013-03-28 00:13:54

标签: paypal cart shopping

我正在使用PayPal购物车,当我收到订单时 - 无论是来自eBay还是来自我的网站,我都会发送一条自动回复消息,感谢客户的订单等。这已经很好了,因为我设置了它在我的电子邮件程序(Windows Live Mail)中,当某些单词在主题行中时发送回复(例如“收到付款”,“收到付款通知”等)。它就像一个魅力,因为发件人是实际客户的电子邮件地址,即使它来自PayPal。

然而,现在发件人是“member@paypal.com”,所以我的所有通知都归还给我了。

我是否可以使用解决方法将这些自动回复消息发送给我的客户?

感谢您提出的任何想法。

杰克逊

2 个答案:

答案 0 :(得分:0)

您可以设置IPN脚本以向客户发送电子邮件。 IPN POST将包含买家电子邮件地址。即时付款通知(IPN)是一种消息服务,可通知您与PayPal交易相关的事件。您可以使用它来自动执行后台和管理功能,例如履行订单,跟踪客户以及提供与交易相关的状态和其他信息。您可以在IPN here上找到更多信息。此外,在页面的左侧还有一些与IPN相关的其他链接,您还可以找到一些可以帮助您入门的IPN here示例代码。

<?php
// Revision Notes
// 11/04/11 - changed post back url from https://www.paypal.com/cgi-bin/webscr to https://ipnpb.paypal.com/cgi-bin/webscr
// For more info see below:
// https://www.x.com/content/bulletin-ip-address-expansion-paypal-services
// "ACTION REQUIRED: if you are using IPN (Instant Payment Notification) for Order Management and your IPN listener script is behind a firewall that uses ACL (Access Control List) rules which restrict outbound traffic to a limited number of IP addresses, then you may need to do one of the following: 
// To continue posting back to https://www.paypal.com  to perform IPN validation you will need to update your firewall ACL to allow outbound access to *any* IP address for the servers that host your IPN script
// OR Alternatively, you will need to modify  your IPN script to post back IPNs to the newly created URL https://ipnpb.paypal.com using HTTPS (port 443) and update firewall ACL rules to allow outbound access to the ipnpb.paypal.com IP ranges (see end of message)."


// read the post from PayPal system and add 'cmd'
$req = 'cmd=_notify-validate';

foreach ($_POST as $key => $value) {
$value = urlencode(stripslashes($value));
$req .= "&$key=$value";
}

// post back to PayPal system to validate

$header = "POST /cgi-bin/webscr HTTP/1.1\r\n";

    // If testing on Sandbox use: 
    // $header .= "Host: www.sandbox.paypal.com:443\r\n";
$header .= "Host: ipnpb.paypal.com:443\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";

    // If testing on Sandbox use:
    //$fp = fsockopen ('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30);
$fp = fsockopen ('ssl://ipnpb.paypal.com', 443, $errno, $errstr, 30);

// assign posted variables to local variables
$item_name = $_POST['item_name'];
$item_number = $_POST['item_number'];
$payment_status = $_POST['payment_status'];
$payment_amount = $_POST['mc_gross'];
$payment_currency = $_POST['mc_currency'];
$txn_id = $_POST['txn_id'];
$receiver_email = $_POST['receiver_email'];
$payer_email = $_POST['payer_email'];

//set email variables
$From_email = "From: from@mysite.com";
$Subject_line = "Payment Confirmation";

$email_msg = "Thanks for purchasing my item. Your order will be delivered in 3-4 days. We appreciate your business.";
$email_msg .= "\n\nThe details of your order are as follows:";
$email_msg .= "\n\n" . "Transaction ID: " .  $txn_id ;
$email_msg .= "\n" . "Payment Date: " . $payment_date;

if (!$fp) {
// HTTP ERROR
} else {
fputs ($fp, $header . $req);
while (!feof($fp)) {
$res = fgets ($fp, 1024);
if (strcmp ($res, "VERIFIED") == 0) {
// check the payment_status is Completed
// check that txn_id has not been previously processed
// check that receiver_email is your Primary PayPal email
// check that payment_amount/payment_currency are correct
// process payment

$mail_From = $From_email;
$mail_To = $payer_email;
$mail_Subject = $Subject_line;
$mail_Body = $email_msg;

mail($mail_To, $mail_Subject, $mail_Body, $mail_From);


}
else if (strcmp ($res, "INVALID") == 0) {
// log for manual investigation

$mail_From = $From_email;
$mail_To = $receiver_email;
$mail_Subject = "INVALID IPN POST";
$mail_Body = "INVALID IPN POST. The raw POST string is below.\n\n" . $req;

mail($mail_To, $mail_Subject, $mail_Body, $mail_From);

}
}
fclose ($fp);
}
?>

答案 1 :(得分:0)

自从他们在3月份改变了通知方法以来,我一直与PayPal就这个问题“保持联系”。他们的最后一个但却是一封信:

  

感谢您重新了解有关通知的信息。

     

我首先要说的是,我很遗憾这段时间已经过去了。我知道自从我最初提升你的问题已经有一段时间了,我很难过看到它仍在继续。

     

我再次升级了这一点,并附上要求以前升级的说明。我已要求我的一位主管回复您的投诉,并为您提供所需的完整说明。这将在72小时内完成。

     

感谢您的时间。

     

您诚挚的,   芽   英国最高客户部门   贝

毋庸置疑,四周后我不得不再次接触他们并再次收到类似的道歉。

在某个地方,一位PayPal操作员解释了改变的原因:

  

这种情况发生了变化的原因是卖方直接对买家做出回应,而不是在我们的系统内对应,这主要与争议和索赔有关。但是,如果您通过PayPal系统进行回复,则会进行记录。

我已经无休止地要求他们解释这一点但却无处可去。我会继续用不满的抱怨轰炸他们!

然而,他们意识到,不仅仅是我心怀不满,而且作为一个单独的乐队,担心我的电脑会有任何时间离开。

我的抱怨是:

europeanservices@paypal.com