File: examples/transaction-details.js

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

Contents

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

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

pagseguro.transaction('TRANSACTION_CODE')
    .then(response => {
        console.log('Success');
        console.log(response);
    }).catch(error => {
        console.log('Error');
        console.error(error);
    });