0.1.3 • Published 9 years ago

aplazame v0.1.3

Weekly downloads
2
License
GPL-3.0
Repository
github
Last release
9 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

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.81

10 years ago

0.0.18

10 years ago

0.0.10

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago