hey guys, wondering if any of you can help with this...
i had my site up and running pretty well with eCommerce and paypal, but over the last 2 days ive made some amends/fixes here and there...and now on testing today ive realised my return from paypal has died!
i just get the blank white screen of death when i return from paypal after payment has been made.
this used to work, but i have NO idea what has happened to break it?!
ive been going through files trying to re-upload old versions but getting nowhere, thought it might be best if somebody with more no how could advise me exactly which files will have an impact on this page?
the only thing i can do to get past the white screen of death is to modify this part of the paypalPayments.php file:
function complete() {
if(isset($_REQUEST['custom']) && $custom = $_REQUEST['custom']) {
$params = explode('-', $custom);
if(count($params) == 2) {
if($payment = DataObject::get_by_id('PayPalPayment', $params[0])) {
if($payment->AuthorisationCode == $params[1]) {
if(isset($_REQUEST['payment_status']) && $_REQUEST['payment_status'] == 'Completed') {
$payment->Status = 'Success';
$payment->TxnRef = $_REQUEST['txn_id'];
}
else {
$payment->Status = 'Failure';
}
$payment->write();
$payment->redirectToOrder();
}
but anything i do to that code just results in status being "payment failed" - even though it was a success.
please help!
im so gutted it was working and now its not! i should have just left it alone...
I've attached all files that i thought might be related!