1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    8
    Vote Rating
    0
    kenjibizweb is on a distinguished road

      0  

    Default Paypal and Senca touch 2

    Hi Sencha developers, i am trying to integrate paypal with sencha touch 2. Have any guys successfully integrate it? I have tried to look for sample coding but since like there aren't any out there. Any pointers would be appreciated.
    Thank you

  2. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    3,996
    Vote Rating
    132
    fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all

      0  

    Default

    There is a cordova/phonegap plugin for that:
    http://plugreg.com/plugin/Eaiman/phonegap-paypal-plugin
    Get more personalized support via a support subscription.

    Want to learn Sencha Touch 2? Check out
    Sencha training
    Sencha Touch in Action

    Need more help with your app? Hire Sencha Services services@sencha.com

    When posting code, please use BBCode's CODE tags.

    Need to include a test case use:
    The official Sencha Fiddle

  3. #3
    Sencha User
    Join Date
    Apr 2015
    Posts
    5
    Vote Rating
    0
    jollypksingh is on a distinguished road

      0  

    Default

    Hi,
    I need help to understand paypal plugin integration in ST2 framework.
    I have been trying to intehrate Paypal Cordova plugin with Sencha through call to PrepareRenderer and SinglePayment in Controller.But I get the following error.<br>
    <br>
    cdv-plugin-paypal-mobile-sdk.js: 60 Missing Command Error<br>
    <br>
    TIA<br>
    <br>
    The code for controller is as follows: <br>
    <br>
    <br>
    Code:
    <br>
    BuyNowCmd:function(el){ 
    var me = this; 
    PayPalMobile.renderSinglePaymentUI(me.createPayment(), me.onSuccesfulPayment, me.onUserCanceled( me.createPayment() ) ); 
    },
    onPayPalMobileInit: function(){ 
    var me = this; 
    PayPalMobile.prepareToRender("PayPalEnvironmentSandbox", me.configuration(), me.onPrepareRender() ); 
    configuration : function () { 
     // for more options see `paypal-mobile-js-helper.js
    var config = new PayPalConfiguration({merchantName: "Shop", merchantPrivacyPolicyURL: "https://www.site.com/policy", merchantUserAgreementURL: "https://www.site.com/agreement"}); 
    return config;
    },
    onPrepareRender : function() {
     }, 
    onSuccesfulPayment : function(payment) { 
    console.log("payment success: " + JSON.stringify(payment, null, 4)); 
    onUserCanceled : function(payment) { 
     console.log("payment Cancelled: " + JSON.stringify(payment, null, 4));
    }, 
    onAuthorizationCallback : function(authorization) { 
    console.log("authorization: " + JSON.stringify(authorization, null, 4)); 
    }, 
    createPayment : function () {
     // for simplicity use predefined amount 
     // optional payment details for more information check [helper js file](<a href="https://github.com/paypal/PayPal-Cordova-Plugin/blob/master/www/paypal-mobile-js-helper.js" target="_blank" rel="nofollow">https://github.com/paypal/PayPal-Cordova-Plugin/blob/master/www/paypal-mobile-js-helper.js</a>) 
     var paymentDetails = new PayPalPaymentDetails("50.00", "0.00", "0.00"); 
     var payment = new PayPalPayment("50.00", "USD", "Awesome Sauce", "Sale", paymentDetails);
    }
    Last edited by jollypksingh; 3 May 2015 at 10:04 AM. Reason: format

Thread Participants: 2