• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

  • Register
  • Login
  • Search
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups

How to get started with creation of new payment gateway?

Knowledge Base
8
28
5.5k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    Deepanjali @devansh-webkul last edited by 9 Sept 2020, 06:32

    Hi @devansh-webkul,
    Could you please elaborate on step 3 of the process, I'm not able to locate the correct composer.json file I guess

    1 Reply Last reply Reply Quote 0
    • A
      AshJi last edited by 9 Sept 2020, 06:42

      @Deepanjali composer.json file is in the Bagisto home directory.

      839eaf91-55f8-4ab1-a3b7-b9d382d1800d-image.png

      D 1 Reply Last reply 9 Sept 2020, 07:35 Reply Quote 0
      • D
        Deepanjali @AshJi last edited by 9 Sept 2020, 07:35

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • D
          Deepanjali last edited by 9 Sept 2020, 08:20

          The PayU payment has multiple options, while following the steps mentioned by @devansh-webkul makes it look like a single method:
          7082da5b-2b70-4697-ab14-f6cc51227a91-image.png
          How can I show the underlying methods and not the name of the gateway?

          1 Reply Last reply Reply Quote 0
          • devansh-webkul
            devansh-webkul last edited by 9 Sept 2020, 08:25

            @AshJi

            Hi, for that you need to create one more array key in file packages/ACME/Stripe/src/Config/system.php.

            Right now you only have 3 keys in that file. You need to create one more key in that file,

            For Example,

            return [
                [
                    'key'    => 'sales.paymentmethods.stripe',
                    'name'   => 'Stripe',
                    'sort'   => 1,
                    'fields' => [
                        [
                                'name'          => 'active',
                                'title'         => 'Secret Key', // added hard coded for transaltion you need to add key
                                'type'          => 'text',
                                'validation'    => 'required',
                                'channel_based' => false,
                                'locale_based'  => true,
                        ]
                    ]
                ]
            ];
            

            And then rest is your development.

            1 Reply Last reply Reply Quote 0
            • A
              AshJi last edited by 9 Sept 2020, 08:46

              @devansh-webkul Added a new entry to the file

              packages/ACME/RazorPay/src/Config/system.php
              

              But I don't still understand the whole flow how this new Payment Gateway integration is supported. Where are we telling Bagisto which PG URL to hit to connect to the payment gateway?

               1 <?php
                2
                3 return [
                4     [
                5         'key'    => 'sales.paymentmethods.razorpay',
                6         'name'   => 'Razorpay',
                7         'sort'   => 1,
                8         'fields' => [
                9             [
               10                 'name'          => 'title',
               11                 'title'         => 'admin::app.admin.system.title',
               12                 'type'          => 'text',
               13                 'validation'    => 'required',
               14                 'channel_based' => false,
               15                 'locale_based'  => true,
               16             ], [
               17                 'name'          => 'description',
               18                 'title'         => 'admin::app.admin.system.description',
               19                 'type'          => 'textarea',
               20                 'channel_based' => false,
               21                 'locale_based'  => true,
               22             ], [
               23                 'name'          => 'active',
               24                 'title'         => 'admin::app.admin.system.status',
               25                 'type'          => 'boolean',
               26                 'validation'    => 'required',
               27                 'channel_based' => false,
               28                 'locale_based'  => true,
               29             ], [
               30                 'name'          => 'active',
               31                 'title'         => 'Secret Key',
               32                 'type'          => 'text',
               33                 'validation'    => 'required',
               34                 'channel_based' => false,
               35                 'locale_based'  => true,
               36             ]
               37         ]
               38     ]
               39 ];
              
              1 Reply Last reply Reply Quote 0
              • devansh-webkul
                devansh-webkul last edited by 9 Sept 2020, 09:08

                Hi @AshJi

                This is just the boiler plate. For that you need to setup your code. You can take refrence of the Paypal payment gateway as well.

                D 1 Reply Last reply 9 Sept 2020, 09:46 Reply Quote 0
                • A
                  AshJi last edited by 9 Sept 2020, 09:34

                  @devansh-webkul that was my initial query - why are folder structure of Paypal and one generated by your package different.

                  If one generated by package is not complete then why should one use this package.

                  I am confused now - does one use the package-generator module or clone Paypal folder.

                  1 Reply Last reply Reply Quote 0
                  • D
                    Deepanjali @devansh-webkul last edited by 9 Sept 2020, 09:46

                    Hi @devansh-webkul ,
                    Is there some documentation to integrate PayU or Razorpay gateway with out site,
                    somewhere one can get to enter the redirection url and secret keys?

                    1 Reply Last reply Reply Quote 0
                    • devansh-webkul
                      devansh-webkul last edited by 9 Sept 2020, 14:03

                      @AshJi,

                      In initial phase, Paypal is also the same as you see the fresh package. So as per the requirement changes are done like registering routes, controller, etc.

                      If you are creating packages and modules than you need to go deeper as well.

                      @Deepanjali,

                      Same here if you want to integrate PayU money you can take reference from the Paypal module.

                      D 1 Reply Last reply 10 Sept 2020, 10:55 Reply Quote 0
                      • A
                        AshJi last edited by 9 Sept 2020, 14:54

                        @devansh-webkul Not sure whether I follow you want to say. Feature requirements I assume are internal to Bagisto. As end user, I would be interested in knowing what I can achieve with the 'package-installer' module? If one decides not to go "deeper", what purpose does this module serves? Just having a new payment option show up in UI cannot be the goal.

                        Unfortunately its neither clear in the docs not your replies. If the module in current form does not support full integration then it's fine. But in that case instructions at this link https://devdocs.bagisto.com/create_payment_method.html needs to be updated as they are not in sync with the module.

                        Hope you understand from end user's perspective.

                        1 Reply Last reply Reply Quote 0
                        • devansh-webkul
                          devansh-webkul last edited by 10 Sept 2020, 05:31

                          Hi @AshJi,

                          Yeah, I understand that.

                          We have developed the package generator to simplify and reduce your time to manually creating the folder structures and templates. Any e-commerce doesn't provide you the one execution of payment method, if you're building a custom payment package then you have to do some part of customization yourself.

                          It's an opensource system so you can contribute here if you assume something is wrong. Surely we would love to have a contribution from your side as well.

                          1 Reply Last reply Reply Quote 0
                          • A
                            AshJi last edited by 10 Sept 2020, 06:52

                            @devansh-webkul I would be more than happy to contribute to the open source. But unfortunately there is not enough useful doc available to understand the whole flow. Probably this is the reason almost 90-95% folks contributing are from the core team. Rest 5% folks have mostly done a few bug fixes here and there.

                            Coming to integration with PG there are just 2-3 use cases. And all accept REST call to post a transaction (pre defined inputs) and it returns transaction status - success or failure. There cud be a few more secondary APIs. It cannot be more complicated than that.

                            If someone from Bagisto team can work with me then I can help make a generic module and make it available to all your users. I seem posts so many folks struggling with same few problem.

                            1 Reply Last reply Reply Quote 1
                            • D
                              Deepanjali @devansh-webkul last edited by Deepanjali 10 Sept 2020, 10:57 10 Sept 2020, 10:55

                              @devansh-webkul I am new to payment gateways (I mentioned it in the opening of the topic) so I don't have much idea about the routes and controllers required and also don't have much idea about the flow of this framework which makes it difficult to explore deeper,
                              therefore I was asking for a guide to integrate a payment gateway to have a better clarity of What and How?

                              I suppose someone from the team at least must given payment integration a test run, who could guide us through this.

                              1 Reply Last reply Reply Quote 1
                              • about a month later
                              • A
                                Ang Norman last edited by 19 Oct 2020, 06:30

                                @devansh-webkul hi I would like to ask about the package creation of payment method. 32f4b79e-c48f-4b24-a2de-bc7600979a65-image.png

                                Here it shows that the package:make-payment-method is not defined in my system. May I know the reason on this? Thank you very much

                                1 Reply Last reply Reply Quote 0
                                • devansh-webkul
                                  devansh-webkul last edited by 19 Oct 2020, 08:34

                                  Hi @Ang-Norman,

                                  Please install Bagisto Package Generator.

                                  You can take reference from here,
                                  https://github.com/bagisto/bagisto-package-generator

                                  1 Reply Last reply Reply Quote 0
                                  • 11 months later
                                  • W
                                    wontoneesaju last edited by 5 Sept 2021, 12:30

                                    for payu this extension works https://wontonee.com/bagisto-payu-integration-manual/

                                    1 Reply Last reply Reply Quote 0
                                    21 out of 28
                                    • First post
                                      21/28
                                      Last post