<commit_before><commit_msg>Arquivo de exemplo de pagamentos<commit_after>var PagSeguro = require('../index');

var payment = new PagSeguro.Payments({
    email: '<EMAIL>',
    token: '<KEY>',
    mode: PagSeguro.Payments.MODE_SANDBOX,
    debug: true
});

payment.currency('BRL');
payment.reference('d99s87das54fdf5s6');

payment.addItem({
    id: '1',
    description: 'Descrição do primeiro produto',
    amount: '40.00',
    quantity: '1'
});

payment.addItem({
    id: '2',
    description: 'Descrição do segundo produto',
    amount: '40.00',
    quantity: '9'
});

payment.sender({
    name: '<NAME>',
    email: '<EMAIL>',
    phone: {
        areaCode: '51',
        number: '12345678'
    }
});

payment.shipping({
    type: 1,
    name: '<NAME>',
    email: '<EMAIL>',
    address: {
        stree: 'Endereço',
        number: '10',
        city: 'Nome da cidade',
        state: 'PR',
        country: 'BRA'
    }
});

payment.checkout(function(success, response) {
    if (success) {
        console.log('Success');
        console.log(response);
    } else {
        console.log('Error');
        console.error(response);
    }
});
{'fraction_non_alphanumeric': 0.17482517482517482, 'fraction_numerical': 0.028846153846153848, 'mean_word_length': 2.6816720257234725, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '202117', 'n_tokens_mistral': 415, 'n_tokens_neox': 400, 'n_words': 84}