Blank screen after processing payment


#1

Hi All,

I have a registration app that I built using Angular Meteor that sends a post to a hosted payment page for credit card processing. The hosted payment page sends the response message back to my app where I process the message and redirect to a receipt page.

When I run through a registration, I’m able to complete it successfully. However some customers have reported that they are able to complete the payment process and upon returning are displayed a blank screen.

I’ve verified that the payment is processed through the merchant payment portal and I can see the payment message being processed on the server, but it never gets to the receipt component to display.

Any thoughts as to what is happening would be appreciated.

TIA


#2

Hi All,

Sorry to bump this issue up. It seems I’m still running into this issue. I think it might help if I add some code.
On the server side I process the response from the payment provider using Picker:

Picker.route('/api/webhooks/processor', function (provider, request, response) {
  // Now we have access to request.body!
  if (request.body.message) {
    console.log('request.body', request.body);
    var response_code = parseInt(request.body.response_code);

    if (response_code < 50) { // Transaction approved
      let receipt_data = { ... }

      // Insert transaction into the invoices collection 
      let invoice = { ...  }
      Invoices.collection.insert(invoice);
      msg = "routing to receipt - txn num =" + request.body.txn_num;
      response.writeHead(302, {
        'Location': '/dashboard/receipt/' + request.body.txn_num
      }); 

    } else { // Transaction declined 
      msg = "Transaction has been declined - routing to declined.  Response code = " + response_code;
      response.writeHead(302, {
        'Location': '/dashboard/declined'
      });
    }
  }
  // Handle a 404 error here - for some reason there was an issue with the payment response
  console.log(msg);
  response.end();
});

In my ReceiptComponent I have a log line in the constructor:

Meteor.call("logToConsole", "@ReceiptComponent");

Here’s what I’ve observed:

  1. request.body content arrives from the payment processor correctly
  2. The invoice is inserted into the database correctly
  3. “msg = routing to receipt - txn num = txn_num
  4. On transactions with the blank screen the @ReceiptComponent isn’t logged so the component is not loading

Does anyone know or have some suggestions to check as to what might be causing the component not to load?