Hi,
Ik heb een paypal api en nou als de koper betaalt wordt hij gestuurd naar een succes pagina. Maar ik wil dat er net als one2xs gecontroleerd wordt of je hebt betaald en als je hebt betaald dan voert hij een query uit.
Nou zag ik bij mijn paypal_ipn script dit:
?>
Dan zie je dat hij controleert op betaal status, als je hebt betaald dan weergeeft hij succes en andersom Failure.
Moet ik dan hier een query meegeven wanneer die gene heeft betaald?
Help my
Thanks
Ik heb een paypal api en nou als de koper betaalt wordt hij gestuurd naar een succes pagina. Maar ik wil dat er net als one2xs gecontroleerd wordt of je hebt betaald en als je hebt betaald dan voert hij een query uit.
Nou zag ik bij mijn paypal_ipn script dit:
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]// Include the paypal library[/COLOR]
[URL="http://www.php.net/include_once"]include_once[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]Paypal.php[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #FF8000]// Create an instance of the paypal library[/COLOR]
[COLOR= #0000BB]$myPaypal[/COLOR] [COLOR= #007700]= new[/COLOR] Paypal[COLOR= #007700]();[/COLOR]
[COLOR= #FF8000]// Log the IPN results[/COLOR]
[COLOR= #0000BB]$myPaypal[/COLOR][COLOR= #007700]->[/COLOR]ipnLog [COLOR= #007700]=[/COLOR] TRUE[COLOR= #007700];[/COLOR]
[COLOR= #FF8000]// Enable test mode if needed[/COLOR]
[COLOR= #0000BB]$myPaypal[/COLOR][COLOR= #007700]->[/COLOR]enableTestMode[COLOR= #007700]();[/COLOR]
[COLOR= #FF8000]// Check validity and write down it[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$myPaypal[/COLOR][COLOR= #007700]->[/COLOR]validateIpn[COLOR= #007700]())
{[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$myPaypal[/COLOR][COLOR= #007700]->[/COLOR]ipnData[COLOR= #007700][[/COLOR][COLOR= #DD0000]payment_status[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]Completed[/COLOR][COLOR= #007700])
{[/COLOR]
file_put_contents[COLOR= #007700]([/COLOR][COLOR= #DD0000]paypal.txt[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]SUCCESS[/COLOR][COLOR= #007700]);
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
file_put_contents[COLOR= #007700]([/COLOR][COLOR= #DD0000]paypal.txt[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"FAILURE
"[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$myPaypal[/COLOR][COLOR= #007700]->[/COLOR]ipnData[COLOR= #007700]);
}
}[/COLOR] ?>
Dan zie je dat hij controleert op betaal status, als je hebt betaald dan weergeeft hij succes en andersom Failure.
Moet ik dan hier een query meegeven wanneer die gene heeft betaald?
Help my

Thanks
