paypro: example - show raw hex when receiving Payment.

This commit is contained in:
Christopher Jeffrey 2014-08-01 19:05:31 -07:00
parent 2482541e17
commit 09c034f0c6
1 changed files with 4 additions and 1 deletions

View File

@ -225,6 +225,9 @@ app.post('/-/request', function(req, res, next) {
app.post('/-/pay', function(req, res, next) {
var body = req.paymentData;
print('Received Payment Message Body:');
print(body.toString('hex'));
body = PayPro.Payment.decode(body);
var pay = new PayPro();
@ -234,7 +237,7 @@ app.post('/-/pay', function(req, res, next) {
var refund_to = pay.get('refund_to');
var memo = pay.get('memo');
print('Received payment from %s.', req.socket.remoteAddress);
print('Received Payment from %s.', req.socket.remoteAddress);
print('Customer Message: %s', memo);
print('Payment Message:');
print(pay);