나는 VIP 구매 버튼을 원합니다. (PP에서 생성 된) 텍스트 상자 (이 코드는 풀리지 않습니다. 페이팔은 튜토리얼에서 어떤 것을 제공합니까?) :즉석 지불 통지
...........
// STEP 3: Inspect IPN validation result and act accordingly
if (strcmp ($res, "VERIFIED") == 0) {
// The IPN is verified, process it:
// check whether 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 the notification
// 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'];
$player_indentificator = $_POST["player_id"];
mail("[email protected]", "TEST", $player_indentificator)
// IPN message values depend upon the type of notification sent.
// To loop through the &_POST array and print the NV pairs to the screen:
foreach($_POST as $key => $value) {
echo $key." = ". $value."<br>";
}
} else if (strcmp ($res, "INVALID") == 0) {
// IPN invalid, log for manual investigation
echo "The response from IPN was: <b>" .$res ."</b>";
}
?>
하지만 지불 할 때 그 이메일을받지 못합니다. 왜? 아마도 뭔가 잘못하고 어쩌면 잘못하고있는 것 같습니다.
코드에서 'mail()'행을 실행합니까? 오류가 있습니까? 그들을 확인합니까? 충분한 정보를 제공하지 않았습니다. – EJP
그건 보안 위반이 아닙니다. IPN은 PayPal로 다시 전화를 걸어 실제로 데이터를 확인합니다. 귀하의 코드 로직은 누군가가 충돌 할 수있는 미확인 IPN을 쉽게 버리거나 기록 할 수 있습니다. 나는 일반적으로 문제가있을 때 IPN URL을 사람들에게 물어 본다. 그래서 나 자신을 치고 내가 얻은 결과를 볼 수있다. 문제를 해결하는 데 도움이됩니다. –
@EJP IPN URL을 알면 보안 문제가 무엇인지 알려주실 수 있습니까? – Vimalnath