Icontem

File: examples/notification-details.js

Recommend this page to a friend!
  Classes of Edvaldo Szymonek  >  PagSeguro Node.js  >  examples/notification-details.js  >  Download  
File: examples/notification-details.js
Role: Example script
Content type: text/plain
Description: example
Class: PagSeguro Node.js
Process payments using UOL PagSeguro
Author: By
Last change:
Date: 3 years ago
Size: 428 bytes
 

Contents

Class file image Download
var PagSeguro = require('../index');

var pagseguro = new PagSeguro({
    email: 'edvaldoszy@gmail.com',
    token: 'ACCESS_TOKEN',
    mode: PagSeguro.MODE_SANDBOX,
    debug: true
});

pagseguro.notification('NOTIFICATION_CODE', function(success, response) {
    if (success) {
        console.log('Success');
        console.log(response);
    } else {
        console.log('Error');
        console.error(response);
    }
});