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

Points to Learn from Your Competitors about Beta Testing
Currently there is a lot of competition in the market. As everybody’s technology and strategies are improving day by day, there is a huge opportunity to learn from the others businesses too. Our biggest learning comes from our Competitors. They can teach us many things which you can easily grasp and improve yourself. User Acceptance Test is a software testing procedure executed in a real-world scenario. UAT has two types - Alpha and Beta testing. Alpha testing takes place in the company whereas beta testing is field testing. The software is tested in real-world working conditions which takes place at the customer’s site.

Below are the followings points which can we learn from other competitors about beta testing.

  1. The important thing that you can learn from your competitors is how they proceed with the beta testing and how they strategise their every action. They prepared several instructions before proceeding with the beta testing. Proper project planning should be written down and agreed upon by the other fellow mates. The objective of the beta testing and how you’re going to achieve that goal should be clear.

  2. If you’ve ever looked at the team of other competitors who include professional beta testers, they are able to achieve their work more easily. You can also gather a team of professionals with experience in the beta testing. Their opinions and aspects would be totally different which will provide various working conditions which can be used for the beta testing procedure.

  3. If you want to improve your structure of software or modifying it, you can learn how the other competitors take feedback from their users. By taking the proper feedback from their users they alter every single of the bugs or error which shows up during the beta testing procedure. You can also improve your software by taking feedbacks from your user when they start using the beta software. The feedback can be in the form of bugs report, quotes, suggestions or surveys.

  4. Learn the major tools which are being used by the other software testing companies and try to understand the concepts of different tools which are used in the beta testing procedure. Thus it would be a great thing to learn from the other top companies and follow their footsteps. Try using different tools and adapt them.

  5. Many of your competitors may use beta testing as a marketing strategy. They strategise their market planning and create awareness among the users about the beta software. It helps in creating a buzz among the beta users and creates eagerness among them. Thus you can also use this type of strategy to engage your beta users and create more eagerness among them. This will help in the involvement of a beta user if there is a new version of the beta software which is going to update.

  6. If you want to make your application more useful, you need to understand what platforms you are using to test your software. Learn from the other competitors and see which platforms they are using for beta testing of their software. You can learn to release an app which can perform on more than one platform with more than one different ways of performance. This is the best way to make your software more usable by doing tests on different platforms which you can learn from your competitors.

  7. You can use the tool which your competitors use to save time by taking the valuable feedback from the beta users. This will help you to take valuable feedback from the user directly to your tool services. You don’t have to ask them over a phone or visit them. This tool will help you to set up a particular email ID which can be used to catch feedback from the users.

  8. You can learn simple to complex things from your competitors. The simplest thing which your competitors can teach you is the patience and integrity. You don’t have to falter when your QA testified software comes up with a lot of errors and bug while running beta testing. There are many companies which face failures and still come up with a great solution for their services.

  9. Your competitors may use quantity of beta testers to test their software in a real You can also get a large number of beta testers who are professional in testing the software under real-work conditions. This will help you to get a plenty of feedback on different aspects of your software. Always look for the quality beta testers and invite them for beta testing.

  10. The last thing you can learn from your competitors is how they handle their feedback and bugs reports. How fast they can be to provide the solution to that problem. You can have an effective team of experts which can take this valuable feedback and without wasting any time comes up with a solution and makes your software error Major companies solve their bug issue in just a few times after getting a feedback.

January 26, 20224 minutesauthorNayan Patel
How To Setup SSH key in Windows

In this article, I show you how to set up SSH in windows10,

first of all, you have a question what is the ssh key, and why do we need it?

you can watch this video or follow an article.

Let me explain a bit more, An SSH key is a secure access credential used in the Secure Shell protocol. SSH keys use key pairs based on public key infrastructure technology, the gold standard for digital identity authentication and encryption, to provide a secure and scalable method of authentication. as you know all developers use git for pushing, fetching, and pulling their code from GitLab, GitHub, and any other tools.

So, using SSH key you can use git for your repository and get authentication from GitHub or any tool where you add ssh.

When you set up an SSH key, you create a key pair that contains a private key (saved to your local computer) and a public key.

So, Let's Set up SSH for Git on Windows

Step1: Set up your default identity

firs of all open your terminals like gitbash or cmDer.

  • Now, type the command ssh-keygen and enter and command prompts you for a file to save the key in:

$ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/c/Users/emmap1/.ssh/id_rsa):

  • Press enter to accept the default key and path,/c/Users/<username>/.ssh/id_rsa. or you can specify the path and then press enter.

  • Enter and re-enter a passphrase when prompted.

  • final out put in your terminal is look likes,

    ssh-keygen 
    Generating public/private rsa key pair.
    Enter file in which to save the key (/c/Users/shailesh/.ssh/id_rsa):
    Created directory '/c/Users/shailesh/.ssh'.
    Enter passphrase (empty for no passphrase):
    Enter the same passphrase again:
    Your identification has been saved in /c/Users/shailesh/.ssh/id_rsa.
    Your public key has been saved in /c/Users/shailesh/.ssh/id_rsa.pub.
    The key fingerprint is: e7:94:d1:a3:02:ee:38:6e:a4:5e:26:a3:a9:f4:95:d4 shailesh@InfyOm-PC
  • Let's navigate to path cd /c/Users/shailesh/.ssh/ and fire ls command for confirming file generated or not.

  • ls command displays two files, one for the public key (for example id_rsa.pub) and one for the private key (for example, id_rsa) if successfully generated.

Step 2: Add SSH in Bitbucket.

  • let's fire command cat id_rsa.pub on the terminal and make sure you stay on the .ssh directory.
  • Now, you can see the key in the terminal. so, copy it and add it to bitbucket. click here for Bitbucket and here for Github to add SSH to your account.

Step 3: Add the SSH key to the ssh-agent.

fire command $eval ssh-agent into the terminal and you get output like Agent pid 9795. 9765 PID may be different in your PC.

Step 4: Check Login in terminal

fire command ssh -T git@bitbucket.org in your terminal and you can get output like

Warning: Permanently added the RSA host key for IP address '104.192.141.1' to the list of known hosts.
authenticated via ssh key.

You can use git to connect to Bitbucket. Shell access is disabled
January 10, 20223 minutesauthorShailesh Ladumor
Importance of Employee Motivation

Importance

Motivation allows management to attain its goals. Without motivation, It’s too difficult to attain organizational goals without motivation workplace could be placed in a very risky position.

The motivated employee can lead the higher productivity and allow the organization to achieve a higher level of output. Imagine having employees without motivation for work, they will probably use their time at their desk surfing on the internet for personal pleasure, Gossiping with others, even applying for other jobs as well. This Is a waste of your time and your resources.

Benefits of Motivated Employees

Employee motivation is highly important for each organization since it brings many benefits which include.

  1. Improve Employee Efficiency

  2. Improve Employee Commitment

  3. Ongoing employee Development

  4. Improve Employee Satisfaction

  5. Higher Productivity level

  6. Lower absenteeism

  7. Better problem-solving

  8. Creativity and Innovation

  9. Pro-Active workforce

  10. Goal Oriented workforce

  11. a Better understanding of the End Goal

  12. Lower turnover

  13. Better as a Team Player

  14. Influence to another worker

  15. Great reputation leads to strong recruitment

  16. Client-centric

To know more about Employee motivation, kindly read the upcoming monthly blog.

January 04, 20223 minutesauthorMariyam Bemat
Top 5 web design trends that will shape the future

Here are a few modes for web design trends

Dark Mode

They look very modern and also very pleasing to the eye. They look amazing and stand out from other colors. Sometimes the most stunning web designs begin. Dark themes are great for OLED screens, which extend the life of the screen and also save power. The best part is that it is very easy to see and not too bright. If you are thinking of keeping something simple you can simply choose a dark mode and it can easily have a good effect on your mood.

3D Elemental

3D visuals are very interesting and they always make people wait for them. This is more about technology and the price tag and so the designers are working together to develop a 3D elemental design without any use of NASA tire equipment. Until VR becomes a trend, one can easily use these 3D designers and experience the reality of matter. Interactive 3D design lasts longer and looks more attractive at the same time. So you can also use this to break down the boundaries between space and reality. It looks great and you will enjoy the mode to the fullest.

Floating Elements And Layers

If you like something with more depth then this is for you as these soft shadows with floating elements add more life to the web page. It has a 3D light look and is not just graphics. One can use photos, text and move it forward. These effects and the feel of the web page will be lighter and the floating elements will make it more beautiful. If you are a travel company you may choose to have this one for your site.

Graphics and Photography

If you want to make it a little more memorable, you need this. You can put graphics on top of your favorite photographs. You can also be creatively wild and get your creativity for it. This can be versatile as it is like a collage of items with which it can add special versions and features to make it look more attractive. The person needs to match the pictures and graphics according to the brand personality. How people can interpret a photograph can take away the style. It's a sophisticated theme.

White Space With Solid Frames

Here you can easily play with solid compositions and also use different ways of using white space and with that you can give a better texture to their style and also use cleaner framing. Lots can be done here with fitting shapes in white spaces. This can brighten up all the visuals and make it very easy to order and separate different parts of the page. Designers love this type of framing and this is a simple website design if you want simplicity.

December 31, 20213 minutesauthorKishan Savaliya
CSS Vendor Prefix

Vendor Prefixes

The CSS Browser (Vendor) prefix is a way to add support for new CSS features for the browser before those features are fully supported across all browsers.

When CSS3 is popular, choose all sorts of new choices. Unfortunately, not all of them were browser-supported. The developers of the vendor service organization help to use those innovations and need to use them without waiting for each browser to become available.

CSS prefixes

The prefixes used are:

  • -webkit- Chrome, Safari, newer versions of Opera, almost all - iOS browsers.
  • -moz- Firefox.
  • -o- Old versions of Opera.
  • -ms- Microsoft Edge and Internet Explorer.

When using a Vendor prefix, keep in mind that it is only temporary. Many of the properties that used to have a Vendor prefix attached to them are now fully supported and not needed.

How Should You Use Them?

You can easily use vendor prefixes, simply by adding them before the property, like this:

.element {
  -webkit-transition: all 1s linear;
  -moz-transition: all 1s linear;
  -ms-transition: all 1s linear;
  -o-transition: all 1s linear;
  transition: all 1s linear;
}

In this case, you ensure the property is supported in browsers.

It is a good practice to put the unprefixed property at the bottom. This way, by using the cascading nature of CSS, you ensure that when the property is fully supported, this is the one it will use.

Which Property Needs Prefixing?

A good thing would be to stop guessing and check out these websites: (http://shouldiprefix.com/) (https://www.w3.org/TR/css-2010/#properties/)

A good way to check which property is available for use without a Vendor prefix is to check the CanIUse service. There you can see which browsers currently support which properties.

November 21, 20213 minutesauthorPayal Pansuriya
How to Start and Stop Jobscheduler in Android

Android apps will work in the background (Android Background Service) mode to listen to broadcast messages, push services, and many other features that extend the functionality of the app. Similarly, it comes with job scheduling.

The Android Job Scheduler is a very efficient way of dealing with things. It will provide a wake lock for the app by default, which will provide a guarantee that the device will stay awake until the work is completed. Also, it provides better battery performance, which is the key point in any application.

activity_main.xml

This tutorial deals with the Android JobShedular UI is easy. Just two buttons to start and stop jobscheduler.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:app="http://schemas.android.com/apk/res-auto" 
xmlns:tools="http://schemas.android.com/tools" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
tools:context=".MainActivity" 
android:orientation="vertical">

<Button 
android:id="@+id/btn_start" 
android:layout_width="match_parent" 
android:layout_height="wrap_content" 
android:text="Start Service"/>; 

<Button 
android:id="@+id/btn_stop" 
android:layout_width="match_parent" 
android:layout_height="wrap_content" 
android:text="Stop Service"/>;

<LinearLayout/>

MyJobScheduler.Java

Add Android JobScheduler, Job Scheduler starts from this class where we can find methods that will start and stop work.

This method deals with the job start where we can also initialize our MyJobExecutor.java class so that we can execute our task as the job starts.

import android.app.job.JobParameters; 
import android.widget.Toast; 

public class MyJobScheduler extends android.app.job.JobService { 

private MyJobExecutor jobExecutor; 

@Override 
public boolean onStartJob(final JobParameters params) { 
jobExecutor = new MyJobExecutor() {

@Override 
protected void onPostExecute(String str) { 
Toast.makeText(MyJobScheduler.this, str, Toast.LENGTH_SHORT).show(); 
jobFinished(params,false); 
} 
}; 
jobExecutor.execute(); 
return true; 
} 

@Override 
public boolean onStopJob(JobParameters params) { 
jobExecutor.cancel(true); 
return false; 
} 

}
December 25, 20213 minutesauthorVivek Beladiya
User Acceptance Testing: What Tester should know and most preferred criteria by Tester.

User Acceptance Technique is widely used for its efficiency and effectiveness.If we followed all steps of User Acceptance correctly then it will increase the satisfaction of a Customer.

UAT is a process of verifying that a Software or a System works appropriately as per the User Requirement.The main purpose of this testing is to ensure that a software system is all set to be in front of users in a real world.This testing phase also known as Beta and End-user testing and is mostly considered during the web development process to ensure that software is ready for the final installation for the Client site.

Types of User Acceptance Testing

  1. Alpha & Beta Testing: Alpha testing is done by the staff members only on an internal whereas beta testing includes the Customer's environment with the help of some customer who will going to use our System or Software.
  2. Black Box Testing: This type of functional testing includes all functionalities of the System without knowing the internal code structure.
  3. Contract Acceptance Testing: In Contract type testing, software is tested against some criteria which are already predefined in a proper contract.
  4. Operational Acceptance Testing: This type of Acceptance testing ensure that all the workflow used in system are working properly.
  5. Regulation Acceptance Testing: Compliance Acceptance Testing helps in investigate the software fulfils all the guidelines of legal and governmental process.

Criteria Before Perform User Acceptance Testing

  1. Entire application code should be up to date.
  2. Integration testing, unit testing and System testing must be completed before we perform User Acceptance Testing.
  3. There should not be any high/medium faults in the Integration phase of Testing.
  4. There must be no major defect in the Regression Testing.
  5. All the error/defects must get solved which we face during the testing and then testing should be done again to verify the error got fixed or not.

Involvement of Users in User Acceptance Testing:

The group is most essential for the UAT must include real end users that will going to perform a test on your system.The stakeholder and other group must incorporated that means an individual of every group is involved in the development phase must be in the team.

Start User Acceptance Testing:

After the explanation of UAT as above, you must get clear about what and why UAT must include in the software development phase. Mainly there are total of four steps that must be considered but it will depend on the number of user that will take advantage of software. The main criteria that must be followed in the software are the ‘working’ requirement of the assembled application. You can easily get a hang of it from the stories of users or system requirements. The second step is to create some test cases for UAT. User Acceptance Testcases are the test steps sets, expected results and execution conditions must be developed for some specific purpose.

Conclusion

These are some main points of the User Acceptance Testing that is used in the development cycle. The projects are reduced to the like of any errors that are elevated and it will reduce the total work required in the maintenance or development phase. On above all of that , you will get a happy and satisfied user that will give you more revenue.

December 20, 20213 minutesauthorNayan Patel
Why UI / UX is Important for your Business?

1. Brand Building

When a customer is satisfied with products or services from a company, they begin to be loyal to him. This leads to product branding. When you work to provide an enhanced UI / UX experience, you can increase your chances of getting happier customers. Happy customers will increase the brand's credibility and help the business in the market with increased sales.

2. Consistency

UI and UX are more than just fonts and colors for a website or application. They are the ones that bring consistency to the developed solution. The size and style of icons, colors and fonts, together with other visual elements work together to give your website or app a unique feel and look. Provides a great user experience while maintaining the UI / UX compatibility of your site or application.

3. Increased Traffic

If your app or website has a better UI / UX, then you will experience better traffic, retain customers and even get new ones. There is fierce competition in the market and attractive design can help you build a strong base for yourself in the market.

4. Customer Satisfaction

Before creating a UI / UX for your app or website, you need to know what your audience wants. Good design means you can keep your users engaged for a long time and offer easy navigation and attractive content. If the user is satisfied with their experience, they will use the services provided to you. This will be reflected in terms of better ROI for your business.

5. Time and Cost-Effective

Advanced UI / UX design development can be a serious investment for your application or site but, when done correctly, it will reduce recurring problems and reduce them to a large level. This way you don't have to go through frequent updates, saving you a lot of time and money.

December 09, 20213 minutesauthorKishan Savaliya