I am making a signature portal where users can buy the designs and I am implementing the code provided by Paypal to make the payments. Until now when you click on the paypal button, it redirects the user to the official paypal page so you can make the payment.
Try it by means of the instant payment notification (IPN) provided in
this question but I do not know where to put the code that explains:
if (strcmp ($res, "VERIFIED") == 0) {
// Acción si PayPal verifica el pago
} else if (strcmp ($res, "INVALID") == 0) {
// Acción si PayPal NO verifica el pago
}
I'm very new to this and I should be like this:
if (strcmp ($res, "VERIFIED") == 0) {
$sql = "UPDATE perfil SET starter_id='3', id_transaction=3, precio="2" WHERE id_perfil=1";
$query_new_insert = mysqli_query($con,$sql);
} else if (strcmp ($res, "INVALID") == 0) {
$sql = "UPDATE perfil SET starter_id='8', id_transaction=3, precio="2" WHERE id_perfil=1";
$query_new_insert = mysqli_query($con,$sql);
}
but when I do the test it does not mark error does not say what happened and it does not insert anything in the database.