Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pagseguro-checkout

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pagseguro-checkout

Easiest way to get Pagseguro checkout url

  • 0.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
Maintainers
1
Weekly downloads
 
Created
Source

Pagseguro Checkout Build Status

Simples e pequeno modulo para consumo da API de checkout do Pagseguro. https://pagseguro.uol.com.br/v2/guia-de-integracao/api-de-pagamentos.html


Get it

npm install pagseguro-checkout

Starting

var pagseguro = require('pagseguro-checkout');

var p = pagseguro("my@email.me", "mytoken");

Adicionando um produto

p.add({
    id: 1,
    description: "Test",
    weight: 50,
    amount: 15.25
});

Setando um comprador

p.sender({
    name: "Jose Comprador",
    email: "comprador@uol.com.br",
    phone: {
        areaCode: 11,
        number: 56273440
    }
});

Setando os dados de envio

p.shipping({
    type: 1,
    address: {
        street: "Av. Brig. Faria Lima",
        number: 1384,
        complement: "5o andar",
        district: "Jardim Paulistano",
        postalCode: 01452002,
        city: "Sao Paulo",
        state: "SP",
        country: "BRA"
    }
})

Setando custom params

p.reference('MyId')
    .redirectUrl('http://mywebpagepagseguro.me')
    .extraAmount('10.00')
    .notificationUrl('http://mywebpagepagseguro.me');

Pegando a URL de checkout

p.request(function (err, res) {
    if (err) throw new Error(err);

    console.log(res);
    console.log(res.code);
    console.log(res.url);
});

Dependency

Keywords

FAQs

Package last updated on 13 Nov 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc