user2236678
user2236678

Reputation: 25

paypal: ipn script is activated on refund

I use paypal ipn and the ipn script is activated when a paypal refund is done

how can I tell in paypal ipn that it's a refund and treat it differently?

Upvotes: 2

Views: 90

Answers (2)

Paul Chris Jones
Paul Chris Jones

Reputation: 2917

if($_POST["payment_status"] == "Refunded"){
    //it's a refund
}

Note there are other payment statuses too, like Completed (for a sale) and Reversed (for when the buyer makes a complaint).

Upvotes: 1

Related Questions