InfyOm Blog

latest-post

How to integrate paypal payment gateway with Laravel / PHP ?

In this tutorial we are going to see to integrate the paypal payment gateway with checkout method using the Laravel.

We are going to use package : https://github.com/srmklive/laravel-paypal

Install the package

composer require srmklive/paypal:~3.0

Publish Assets

php artisan vendor:publish --provider "Srmklive\PayPal\Providers\PayPalServiceProvider"

Set Paypal credentials into config/paypal.php

return [
    'mode'    => env('PAYPAL_MODE', 'sandbox'), // Can only be 'sandbox' Or 'live'. 
    'sandbox' => [
        'client_id'         => env('PAYPAL_SANDBOX_CLIENT_ID', ''),
        'client_secret'     => env('PAYPAL_SANDBOX_CLIENT_SECRET', ''),
        'app_id'            => '',
    ],
    ......
    ......
];

Create Routes

routes/web.php

 Route::get('paypal-onboard', [PaypalController::class, 'onBoard'])->name('paypal.init');
 Route::get('paypal-payment-success', [PaypalController::class, 'success'])->name('paypal.success');
 Route::get('paypal-payment-failed', [PaypalController::class, 'failed'])->name('paypal.failed');

Create Controller

app\Http\Controllers\PaypalController.php

setCurrency('EUR');
        $provider->getAccessToken();
        $data = [
            "intent"              => "CAPTURE",
            "purchase_units"      => [
                [
                    "amount" => [
                        "value"         => 100,
                        "currency_code" => getCurrencyCode(),
                    ],
                ],
            ],
            "application_context" => [
                "cancel_url" => route('user.paypal.failed'),
                "return_url" => route('user.paypal.success'),
            ],
        ];

        $order = $provider->createOrder($data);

        return redirect($order['links'][1]['href']);
    }

    public function failed()
    {
        dd('Your payment has been declend. The payment cancelation page goes here!');
    }

    public function success(Request $request)
    {
        $provider = new PayPal();      // To use express checkout.
        $provider->getAccessToken();
        $token = $request->get('token');

        $orderInfo = $provider->showOrderDetails($token);
        $response = $provider->capturePaymentOrder($token);

        dump($orderInfo);
        dd($response);
    }
}

That's it. Enjoy.

September 01, 20221 minuteuserVishal Ribdiya

Posts

How to convert a Lead into a Client

Most of your leads through your conversion funnel will not automatically convert into sales. He will often need extra help to make the conversion.

Talk about value first

Focus on bringing value to your customers' lives. People dislike it who only care about getting sales from it. focus on addressing your customers' needs.

Work as a mentor with great expertise in your field. If you are the center of contact for potential customers, they will also trust your decision and solutions to their problems.

Identify their problem

You need to identify the problem that is causing the lead. Whenever you ask a question, take a different approach, because it starts a conversation. This is a great way to open up a conversation and raise questions or concerns that might arise.

Make it a conversation

It is clear that your potential will be more responsive if you encourage two-way communication. You can definitely find out how your product or service works for them.

Ask for sales

Just asking for a sale is nothing new or innovative, but it is a crucial part of the conversion process. That sounds like common sense, yet a surprising number of people don't.

Ask your prospects if they are ready to get started and see how many say "yes". They would not have gone so far had it not been for their initial interest in becoming a customer. If you do not ask for sales, you will have competition.

Follow-up

Keep your leads in purchase mode by following up via email or phone calls. This is a great way to quickly convert them into customers before a long time passes. All leads you generate should be contacted immediately and followed up in a few days.

You want to make sure they are as successful as possible with the product and that all their questions are answered.

March 07, 20222 minutesauthorAnkit Kalathiya
The Difference Between UX and UI Design

UX and UI designs are similar and are often used interchangeably. In fact, these two words have completely different meanings and relay different activities. These two businesses have essentially been around for years, but only recently have been involved in the technology industry, which has been renamed to encourage UI and UX designers.

These two components are essential when it comes to digital products, but the roles are very different. They refer to various aspects of both product development as well as the actual design process. Although UX means "user experience" and UI means "user interface", both jobs cover much more than they seem, which makes learning UX and UI more important at the same time.

User Experience Design (UX)

Originally defined by a cognitive scientist named Don Norman, the term "user experience" was defined before the 21st century. He described UX as "all aspects of the end-user interaction with the company, its services, and its products".

UX can be applied to anything in life that creates an experience. Whether it's a website, a mobile app, a theme park, or a tea party. UX doesn't have to be related to anything in the world of graphic design. User experience is the user's interactions and user "experience" with a product or service.

When it comes to digital products or services, UX is concerned with how a web page, mobile application, or software perceives the user. This may include simplifying the website checkout process or simplifying the application for general use.

uxdesign

You could say that a UX design job requires marketing, design, and project management skills. It is a complex role. Regardless of whether it is being applied to a car, shoe, or website, UX Designer's main goal is to create a simple and pleasant user experience. The product needs to communicate the owner’s goals, while also meeting the needs of the user.

User Interface Design (UI)

UX and user interface (UI) are often compared or grouped in the same job description. These two modes are very different, leaving the UI to be misinterpreted.

Often when looking at job descriptions for UI offerings, you will see a closer description of graphic design. Although UI positions sometimes deal with parts of branding or even frontend development, they do not indicate the original position.

User interface design is a digital term. This is mainly where it differs from UX. A UI is simply an interaction between a user and a digital product or service. This may include a touchpad that allows you to select your coffee from an automatic coffee machine or from your computer screen. It also deals with applications and websites that look and feel how the user interacts with the product.

uidesign

The main purpose of the UI is that the designer will use design tools that enable better communication between the designer and the developer. This in turn will facilitate implementation with developers.

The user interface is an incredibly important element that allows the user to trust the brand. The UI designer is also responsible for relaying the message of the product as well as its research and content into a compelling display or experience.

UX vs. UI

The comparison of UX and UI is almost like apple and orange. If you take the human brain with the right hand representing creativity (usually left-handed individuals), this would be the UI design. If the left side of the brain represents the analysis (usually right-handed individuals), then the left side UX.

ui_ux

UI design is creative, fuzzy, beautiful, and presentable. UX design is, alternatively, the optimization, organization, and structure of the data to be implemented. Without one or the other, the project cannot be completed. To complete the product, you may not lack UX or UI. Despite this, they have completely different roles with different functions.

In general, a UX designer will need to fully map the entire user's journey to solve a specific problem in a product. Much of the UX Designer's job is to understand the user's problems and how to solve them. UX designers work by researching to understand the users they are targeting and what their needs will be.

Alternatively, UI designers consider all aspects of the visual elements. Everything from the first screen to the last screen. The UI designer will make sure the colors are readable. This may include ensuring that a partially blind 65-year-old feels comfortable using the same screen as a normal 13-year-old.

February 25, 20224 minutesauthorKishan Savaliya
How to check Laravel logs with UI Interface ?

Debugging the most important thing that developers always need while developing things.

If it's about local environments then we can easily check our logs by putting logs to local but when it's about live environments it's a time-consuming process.

We have to go to the files and open/download those files to local and then we are able to check live logs.

Here we are going to one package that will provide us the UI interface and we can easily check all our logs there.

We can also clear / delete our logs files from there. its better to use daily logs so we can trace logs easily.

Let's see how we can integrate that package to our existing laravel application.

Installation

composer require rap2hpoutre/laravel-log-viewer

Add Service Provider to config/app.php in providers section

Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider::class,

Access Logs UI By adding a new route

Route::get('logs', [\Rap2hpoutre\LaravelLogViewer\LogViewerController::class, 'index']);

That's it and you can see all the logs thereby accessing the given route.

That will saves lots of debugging time, hope that will help you :)

February 25, 20221 minuteauthorVishal Ribdiya
ERP Testing Insights: How to do ERP Testing ?

What Is ERP Testing?

Before going into ERP testing, we've to know about the ERP. ERP stands for Enterprise Resource Planning. ERP Testing is critical since each business can customise its workflow depending on the needs of their organisation. When doing ERP testing, the tester has got to understand the business workflows, data flows, and ERP modules. Then only he/she are going to be ready to test and ensure the system implementation is suiting their organisation.

How To Do ERP Testing?

ERP Testing mainly focuses generally on functional testing and performance testing. The next preference is given for the mixing between the modules and therefore the data flows. ERP testing are often done either manually or automatically. ERP testing are often wiped out the below phases:

Identify the business processes and define the scope of testing.

  1. Setting up a test system.
  2. Prepare Test Plan.
  3. Prepare the test suites.
  4. Create test data sets.
  5. Write test cases.(manual/automated)
  6. Test Execution.
  7. Prepare Test Reports.

Different Types Of ERP Testing

Functional Testing: Functional testing will cover the aspects of compatibility, localisation, integration with other systems, etc. The testing are often done either manually or by automation. This is the primary testing type got to be conducted since the functional workflow should work flawlessly. After functional testing completed, the opposite sorts of testing got to be performed. The testing are often done by manual or automated testing.

Integration Testing: Integration testing usually conducted when an application is interacting with multiple components. The components need to be tested individually. After the completion of the testing of the modules, it must be tested with all components as an entire workflow. Then only the system should work sort of a single unit at the top after integration seamlessly.

Performance Testing: Performance testing usually conducted to make sure what percentage users can access the system at an equivalent time and what's the reaction time during that. The user volume and therefore the concurrent usage are going to be more after the implementation of ERP systems. It is critical to try to to the performance testing of the ERP system since it's to interact with multiple applications.

Security Testing: Security testing is conducted to make sure that the system follows the quality security policies and rules. It helps to spot risks, threats, and vulnerabilities of the system. After identifying the vulnerabilities, those should be fixed and tested before the implementation of the ERP system.

February 25, 20222 minutesauthorNayan Patel
How To Add Google In-App Review for Android

Integrating in-app reviews is very easy. It can be achieved with very minimal code. Let's see how to integrate it.

1. As the In-App Review is a part of the Play core library, we need to add the required dependencies to our app's build.gradle (app level) file,

implementation “com.google.android.play:core:1.8.0”
implementation "com.google.android.material:material:1.3.0-alpha02"

2. First, we need to create the instance of ReviewManager which would help us to start the API. We create the instance using,

ReviewManager manager = ReviewManagerFactory.create(this);

Now, using this manager object, we have to request the flow to launch the In-App review flow.

 ReviewManager manager = ReviewManagerFactory.create(this);
 Task<ReviewInfo> request = manager.requestReviewFlow();
 request.addOnCompleteListener(task -> {
      if (task.isSuccessful()) {
// We can get the ReviewInfo object
      ReviewInfo reviewInfo = task.getResult();
      } else {
// There was some problem, continue regardless of the result.
      }
 });

A complete code is required for the in-app review flow.

MainActivity.java
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.google.android.play.core.review.ReviewInfo;
import com.google.android.play.core.review.ReviewManager;
import com.google.android.play.core.review.ReviewManagerFactory;
import com.google.android.play.core.tasks.Task;

public class MainActivity extends AppCompatActivity {

   private ReviewManager reviewManager;

   @Override
   protected void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.activity_main);
       init();
   }

   private void init() {
       reviewManager = ReviewManagerFactory.create(this);
       findViewById(R.id.btn_rate_app).setOnClickListener(view -> showRateApp());
   }

   public void showRateApp() {
       Task<ReviewInfo> request = reviewManager.requestReviewFlow();
       request.addOnCompleteListener(task -> {
           if (task.isSuccessful()) {
               ReviewInfo reviewInfo = task.getResult();
               Task<Void> flow = reviewManager.launchReviewFlow(this, reviewInfo);
               flow.addOnCompleteListener(task1 -> {
               });
           } else {
               showRateAppFallbackDialog();
           }
       });
   }
   private void showRateAppFallbackDialog() {
       new MaterialAlertDialogBuilder(this)
               .setTitle(R.string.rate_app_title)
               .setMessage(R.string.rate_app_message)
               .setPositiveButton(R.string.rate_btn_pos, (dialog, which) -> {

               })
               .setNegativeButton(R.string.rate_btn_neg,
                       (dialog, which) -> {
                       })
               .setNeutralButton(R.string.rate_btn_nut,
                       (dialog, which) -> {
                       })
               .setOnDismissListener(dialog -> {
               })
               .show();
   }
}

How to test the In-App Review?

To check the in-app review flow, you must already have the app approved on Playstore. This does not mean that the application should be available to the public. At the very least, you should have an account ready for internal testing or internal application sharing.

  • You can use Internal Test Track to release the app and test the in-app review flow.
  • You can use Internal App Sharing to test the in-app review flow.

You can find more information about the test part on the Android Developer page.

February 11, 20222 minutesauthorVivek Beladiya
CSS NameSpacing ClassName

Namespacing can be used in any type of programming language, and the advantages are innumerable. However, with CSS, some of the advantages are not particularly obvious. We will take a look at the two most common namespacing usages in CSS and we will discuss their advantages in more detail.

Variables

Using variables in CSS is the simplest and the most common use. Let’s take a look at the following SCSS example code:

`` // Our common variables

// Fonts $f_arial: Arial, Helvetica, sans-serif

// Colors $c_red: #FF0000; $c_black: #000;

// Z-indices $z_index_back: -1; $z_index_base: 1; $z_index_max: 9999;

// Animation Timings $t_medium_animation: 200ms;

// Breakpoints $b_mobile: 700px; $b_desktop: 1200px; ``

we have defined five different organizational categories:

  • $f_ font and webfont families
  • $c_ color codes
  • $z_ z-indices used throughout the application
  • $t_ animation timings
  • $b_ responsive breakpoints

The biggest advantages of utilizing the organizational categories structure with variables as described above are code clarity and rapid development. This is especially important in large teams where more developers work on the same CSS files. One more notable advantage is added autocomplete feature. Simply by entering a $f in our IDE, we will get an autocomplete list of all declared fonts, or by entering a $b we will get all responsive breakpoints, and so on.

Class Names

The second most common usage of namespacing is by utilizing a CSS class naming. The prefix o- can be used for CSS object class name declarations, while c- can be used for classes. The fundamental distinction between objects and classes is that they may appear more than once in different templates of our design, hence making them harder to meddle with. Separating objects from classes makes it easier for a developer to navigate within a relatively unknown codebase. Another clever concept is to disassociate all the classes solely used in JavaScript with the js- prefix. Finally, is- can define application states such as is-active or is-visible, while u- can prefix utility classes such as u-pull-left.

February 05, 20222 minutesauthorPayal Pansuriya
An In-Depth Look at the Adobe Premiere Pro Editing Tools

Let’s Explain Every Tool From The Toolbar In Adobe Premiere Pro

As a beginner video editor you often struggle with finding the right tools to perform certain actions while editing. And once you’ve finally found some tools to edit, you don’t know what they do. We’ve all been there, so here’s a quick and easy explanation of every tool in the toolbar.

Selection Tool (V)

selection_tool

The Selection tool allows you to perform basic selections and edits. This will be your default and primary mouse function when using Premiere Pro, so make sure to remember the short key for it, which is V on your keyboard. Along with making basic selections, you can also select edit points and perform trims where you can increase or decrease a clip’s duration.

Track Selection Tool - Forward (A) / Backward (Shift+A)

track_selection_tool

The Track Select tool will let you select all of the clips in a sequence, either forward or backwards. All you need to do is use the keyboard shortcut (A) and you can highlight multiple clips at once, in whichever direction you prefer. If you hold shift, the tool will select only one track instead of all of the tracks.

Ripple Edit Tool (B)

ripple_edit_tool

One of my favorite shortcut tools in Premier Pro, Ripple Edit is a trim tool used to trim a clip and "wave" the rest of the clips in a timeline. This will effectively close the gap between the two editing points immediately at the point where you will be editing. This can save a lot of time when editing on-the-fly, as you don't have to manually navigate the rest of your timeline — especially if you're dealing with videos or sequences longer than a few minutes.

Rate Stretch Tool (R)

rate_stretch_tool

The Rate Stretch tool will help you speed up or slow down the clips in your order. When using the tool, note that the in and out points of the clip will always be the same. You will change the duration and speed of the clip according to the amount you "stretch" through the trim. For example, extending the outpoint of a clip will slow down the speed, while shortening the clip will speed up the duration.

Slip Tool (Y)

slip_tool

For visual editors who prefer to make their cuts based on specific images of the corresponding frames, Slip Tool is a great resource for working directly from the monitor. The slip tool "slips" the source of the clip in and out, but does not move it on the timeline.

Slide Tool (U)

slide_tool

Like the Slip Tool, the Slide Tool allows you to work with your clips drawn on the monitor. However, the slide tool works by "sliding" the clip on the timeline, while keeping the source in and out points the same. After sliding the clip, the tool will also close all the gaps.

Pen Tool (P)

pen_tool

Moving on to editing shortcuts and tools to help with keyframes and other elements (such as audio), the Pen Tool is your best choice for adding keyframes to any clip. By selecting the Pen Tool (P), you can click on any point on your clip to add a large number of features, including the opacity, scale, position, and even volume of the audio clip.

January 27, 20223 minutesauthorKishan Savaliya
Why developer choose React JS

There are a few reasons why developers choose ReactJS and they are :-

  1. JavaScript XML or JSX
  2. React use Virtual DOM
  3. ReactJs Props
  4. One-Way Data Binding
  5. Quick Rendering
  6. SEO Friendly
  7. Helpful Developer Toolset

JavaScript XML or JSX

It is a markup syntax that describes the appearance of the application's interface. It creates the same syntax as HTML and is used by developers to create feedback elements.

JSX is one of the best features of React JS as it makes it very easy for developers to write building blocks.

React use Virtual DOM

This feature helps speed up the app development process. The algorithm allows the web page to be copied into React's virtual memory.

The original DOM there is represented by a virtual DOM.

ReactJs Props

ReactJS Props allows developers to move custom development data into its specific UI components. This helps in rendering JavaScript components and improving the UI development experience.

One-Way Data Binding

Feedback uses a stream of data that is directionless, forcing developers to use the callback feature to edit components and prevent them from editing directly.

Control of data flow from a single point is achieved with a JS app architecture component called Flux. It really gives developers better control over the application and makes it more flexible and effective.

Quick Rendering

This means that a small edit made at the top level can hit the app UI hard. Thanks to the virtual DOM, it can be tested first to determine the risk level with each change before finalizing all changes.

SEO Friendly

To make any application work well, it is important that the search engine selects it; Two factors are important for applications: fast load time and rendering. If both of these boxes are ticked, your app will rank higher on Google results pages.

React's super-fast rendering feature drastically reduces page load time, enabling businesses to rank their apps on the first page of Google search.

Helpful Developer Toolset

Facebook has included many developer tools in the React JS framework for React and Chrome, and they greatly help developers find parents and child components, observe their hierarchies, and test their current status.

Through self-learning, developers will be able to use emerging technologies in real, live, projects.

So, developers choose ReactJS hope this help.

January 26, 20222 minutesauthorVatsal Sakariya