passslot / cordova-plugin-passbook

Passbook Plugin for Cordova/PhoneGap
www.passslot.com
Apache License 2.0
26 stars 31 forks source link

getting error 'No data supplied' #16

Open mabreu14 opened 5 years ago

mabreu14 commented 5 years ago

When debugging I notice that the call to get the pass is happening twice and I am getting an error 'No data supplied'. If I manually make the call to get the pass I can see that is returning a valid pass so that is not the issue.

mabreu14 commented 5 years ago
var api = require('./mx/api')
  , analytics = require('universal-ga');

module.exports = function downloadPass(name, barcode) {
  let clientId = api.options['clientId']
    , baseUrl = api.options['host'];

  return new Promise((resolve, reject) => {
    Passbook.downloadPass(`xxxxxxx`, (pass, added) => {
      if(added) {
        Passbook.openPass(pass);
      }
      resolve();
    }, err => {
      analytics.exception(['Apple Wallet Error', err].join(': '));
      reject();
    });
  });
};
shameersalim commented 5 years ago

Am getting the same error.