Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Claudiu Bria 34 posts 146 karma points
    Mar 16, 2017 @ 08:45
    Claudiu Bria
    0

    QuickPay

    Hi Rusty,

    Is there any newer MerchelloQuickPayProvider package ?

    I found it hard to bring the 1.0.4 to a runnable state. I started with the gateway.controller.js, so I modified it into:

    /** * @ngdoc controller * @name Merchello.Plugin.GatewayProviders.Payments.Dialogs.QuickPayGatewayProviderController * @function * * @description * The controller for the editing payment gateway settings */ angular.module('merchello.plugins.quickpay') .controller('Merchello.Plugin.GatewayProviders.Payments.Dialogs.QuickPayGatewayProviderController', [ '$scope', function($scope) {

            /**
            * @ngdoc method 
            * @name init
            * @function
            * 
            * @description
            * Method called on intial page load.  Loads in data from server and sets up scope.
            */
            $scope.init = function() {
    
                //$scope.dialogData.provider.extendedData
    
                // on initial load extendedData will be empty but we need to populate with key values
    
                var settingsString = $scope.dialogData.provider.extendedData.items[0].value;
                $scope.quickpaySettings = JSON.parse(settingsString);
    
                // Watch with object equality to convert back to a string for the submit() call on the Save button
                $scope.$watch(function() {
                        return $scope.quickpaySettings;
                    },
                    function(newValue, oldValue) {
                        $scope.dialogData.provider.extendedData.items[0].value = angular.toJson(newValue);
                    },
                    true);
            };
            $scope.init();
    
    
        }
    ]);
    

    but now i'm stuck on payment.quickpay.paymentmethod.controller.js. Is this going to be something similar to this from epay ?

    (function () { angular.module('merchello.plugins.epay', [ 'merchello.models', 'merchello.services', 'merchello.providers.models', 'merchello.providers.directives', 'merchello.providers.resources' ]);

    angular.module('merchello.providers.models', []);
    angular.module('merchello.providers.directives', []);
    angular.module('merchello.providers.resources', ['merchello.providers.models']);
    angular.module('merchello.plugins').requires.push('merchello.plugins.epay');
    

    }());

    Again please, anyone with an updated QuickPay plugin here ?

  • Claudiu Bria 34 posts 146 karma points
    Mar 16, 2017 @ 10:17
    Claudiu Bria
    0

    Ok, I think I found out how to change the Merchello.QuickPay plugin files:

    First, gateway.controller.js:

        /**
     * @ngdoc controller
     * @name Merchello.Plugin.GatewayProviders.Payments.Dialogs.QuickPayGatewayProviderController
     * @function
     * 
     * @description
     * The controller for the editing payment gateway settings
     **/
    angular.module('merchello.plugins.quickpay')
        .controller('Merchello.Plugin.GatewayProviders.Payments.Dialogs.QuickPayGatewayProviderController',
        [
            '$scope',
            function($scope) {
    
                /**
                * @ngdoc method 
                * @name init
                * @function
                * 
                * @description
                * Method called on intial page load.  Loads in data from server and sets up scope.
                */
                $scope.init = function() {
    
                    //$scope.dialogData.provider.extendedData
    
                    // on initial load extendedData will be empty but we need to populate with key values
    
                    var settingsString = $scope.dialogData.provider.extendedData.items[0].value;
                    $scope.quickpaySettings = JSON.parse(settingsString);
    
                    // Watch with object equality to convert back to a string for the submit() call on the Save button
                    $scope.$watch(function() {
                            return $scope.quickpaySettings;
                        },
                        function(newValue, oldValue) {
                            $scope.dialogData.provider.extendedData.items[0].value = angular.toJson(newValue);
                        },
                        true);
                };
                $scope.init();
    
    
            }
        ]);
    

    Then, payment.quickpay.paymentmethod.controller.js:

    /**
     * @ngdoc controller
     * @name Merchello.Dashboards.Settings.Payment.Dialogs.PaymentMethodController
     * @function
     * 
     * @description
     * The controller for the adding / editing payment methods on the Payment page
     **/
    angular.module('merchello.plugins.quickpay').controller('Merchello.Plugin.GatewayProviders.Payments.Dialogs.QuickPayPaymentMethodController',
        ['$scope',
            function ($scope) {
    
            }]);
    

    Then we need to add a new one, payment.quickpay.module.js:

    (function () {
        angular.module('merchello.plugins.quickpay',
            [
                'merchello.models'
            ]);
    
        angular.module('merchello.plugins').requires.push('merchello.plugins.quickpay');
    }());
    

    And finally we need to modify the package.manifest:

    {
        javascript: [
            //'~/App_Plugins/Merchello.QuickPay/payment.quickpay.controller.js',
            "~/App_Plugins/Merchello.QuickPay/payment.quickpay.module.js",
            "~/App_Plugins/Merchello.QuickPay/gateway.controller.js",
            "~/App_Plugins/Merchello.QuickPay/payment.quickpay.paymentmethod.controller.js"
        ]
    }
    

    Now in Merchello 2.5.0/2.6.0 the QuickPay Payment Provider loads without errors in the Gateway Providers page and the API keys can be saved without errors.

    This is just my results so far about the settings page of the plugin. I'm gonna study to see if the plugin actually works.

    Again please, if anyone has knowledge of the updated QuickPay plugin that would run in Merchello 2.5.0, that would be much appreciated.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Mar 16, 2017 @ 15:45
    Rusty Swayne
    0

    Thanks for the update Claudiu - Do you have your plugin in a repo somewhere I can have a look?

  • Claudiu Bria 34 posts 146 karma points
    Mar 17, 2017 @ 07:44
    Claudiu Bria
    0

    Unfortunately no, not at the moment. I'll think of something later when/if i get to the bottom of this somehow :)

    Again please, if anyone has knowledge of the updated QuickPay plugin that would run in Merchello 2.5.0, that would be much appreciated.

  • Claudiu Bria 34 posts 146 karma points
    Mar 20, 2017 @ 15:00
    Claudiu Bria
    0

    Hi Rusty,

    I'm trying to add the formQuickPay mentioned in the MerchelloQuickPayProvider page:

    > Add the following form to your checkout flow. I may want to assign
    > ID's to these fields, and insert the values with JavaScript and then
    > submit the form with JavaScript as well. That is up to you, but you
    > will need a form to POST the values to QuickPay.
    > 
    > <form id="formQuickPay" method="POST"
    > action="https://payment.quickpay.net">   <input type="hidden"
    > name="version" value="v10">   <input type="hidden" name="merchant_id"
    > value="1234">   <input type="hidden" name="agreement_id" value="1234">
    > <input type="hidden" name="order_id" value="INSERT VALUE HERE">  
    > <input type="hidden" name="amount" value="INSERT VALUE HERE">   <input
    > type="hidden" name="currency" value="INSERT VALUE HERE">   <input
    > type="hidden" name="continueurl" value="INSERT VALUE HERE">   <input
    > type="hidden" name="cancelurl" value="INSERT VALUE HERE">   <input
    > type="hidden" name="callbackurl" value="INSERT VALUE HERE">   <input
    > type="hidden" name="checksum" value="INSERT VALUE HERE">   <input
    > type="hidden" name="language" value="en">   <input type="hidden"
    > name="autocapture" value="0">   <input type="submit" value="Continue
    > to QuickPay"> </form>
    

    Where exactly do I have to add that please ? Do you have an example ?

    I checked AuthorizeNet plugin code (brought the Nuget packages up-to-date), PayPal Express Checkout code, Stripe plugin code (brought the Nuget packages up-to-date), still cannot figure this out. The closest I got is the code:

    <input class="pull-right" type="image" src="//www.paypalobjects.com/en_US/i/btn/btn_paynow_LG.gif" data-paypal-button="true" alt="PayPay Express"/>
    

    that i see appearing in \App_Plugins\Merchello\views\PayPalExpressPayment\PaymentForm.cshtml file. Should I follow the same pattern ? How do I link it to its controller, please ?

  • René 327 posts 852 karma points
    May 31, 2017 @ 09:28
    René
    0

    Hi Claudiu

    I am at the same point where the Merchello and qickpay does not work.

    Did you find any solutions on this.. René

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Aug 05, 2018 @ 20:36
    Alex Skrypnyk
    0

    Hi Guys

    Did you find a way how to setup quickpay to Merchello?

    Alex

Please Sign in or register to post replies

Write your reply to:

Draft