0.1.3 • Published 10 years ago

aplazame v0.1.3

Weekly downloads
2
License
GPL-3.0
Repository
github
Last release
10 years ago

github-banner

Aplazame SDK for NodeJS

node install aplazame --save

Full example in: Github

var aplazame = require('aplazame')('privateKey');

// this example is using expressjs
app.post('/checkout/confirm', function (req, res) {
  var checkout_token = req.body.checkout_token,
      order = CheckoutOrder.get(checkout_token);

  if( !order ) {
    res.status(404).end();
  }

  aplazame.authorizeOrder(checkout_token)
    .then(function (response) {
      order.confirm().then(function () {
        res.status(204).end();
      });
    }, function (reason) {
      console.log('authorize error', reason);
      // [502 Bad Gateway] The server was acting as a gateway or proxy
      //   and received an invalid response from the upstream server.
      res.status(502).end();
    }).catch(function (err) {
      console.log('authorize error (2)', err);
    });
});
0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.81

11 years ago

0.0.18

11 years ago

0.0.10

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago