angularjs - ionic paypal error Can't find PayPalConfiguration -


refer ionic-paypal integration, added script services.js factory , run in real device.

and add js index.html

<script src="lib/ionic/js/ionic.bundle.js"></script> <script src="lib/ionic/js/angular/angular-resource.min.js"></script> <script src="cordova.js"></script> <script src="lib/external/js/lodash.js"></script>  <script src="js/paypal-mobile-js-helper.js"></script>  <script src="js/app.js"></script> <script src="js/services.js"></script> <script src="js/controllers.js"></script> 

once trigger function:

paypalservice.initpaymentui().then(function () {   paypalservice.makepayment($scope.total(), "total").then(...) }); 

i receive following error

error: can't find variable: paypalconfiguration configuration@http://{ip}:8100/js/services.js:147:49 http://{ip}:8100/js/services.js:155:83 processqueue@http://{ip}:8100/lib/ionic/js/ionic.bundle.js:27879:30 http://{ip}:8100/lib/ionic/js/ionic.bundle.js:27895:39 $eval@http://{ip}:8100/lib/ionic/js/ionic.bundle.js:29158:28 $digest@http://{ip}:8100/lib/ionic/js/ionic.bundle.js:28969:36 http://{ip}:8100/lib/ionic/js/ionic.bundle.js:29197:33 completeoutstandingrequest@http://{ip}:8100/lib/ionic/js/ionic.bundle.js:18706:15 http://{ip}:8100/lib/ionic/js/ionic.bundle.js:18978:33 

// {ip} ip address.

paypalconfiguration should defined in paypal-mobile-js-helper.js

edited:

as requested martijn welker, added more info here:

    function configuration() {         var config = new paypalconfiguration({merchantname: shopsettings.paypalshopname, merchantprivacypolicyurl: shopsettings.paypalmerchantprivacypolicyurl, merchantuseragreementurl: shopsettings.paypalmerchantuseragreementurl});         return config;     }      function onpaypalmobileinit() {         $ionicplatform.ready().then(function () {             paypalmobile.preparetorender(shopsettings.paypalenv, configuration(), function () {                  $timeout(function () {                     init_defer.resolve();                 });              });         });     } 

147:49 calling paypalconfiguration in method configuration()

155:83 calling configuration()

i hope give guys ideas.

thanks expert here!


Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -