InfyOm Blog

latest-post

In this tutorial, we are going to see how we can implement the authorized hosted payment gateway by using their UI and components and take payments from users via authorized net using Laravel.

Create HTML form as like below code :

authorize.blade.php

{{ Form::open(array('url' => 'https://test.authorize.net/payment/payment')) }}

Form::hidden('token', '{{$token}}');

Form::submit('Click Me!');

{{ Form::close() }}

You must have to pass $token to form, we will see below how we can generate that token.

AuthorizeController.php

 public function onboard() {

    $token = $this->getAnAcceptPaymentPage();

    return view('authorize', compact('token'));
 }

 public function getAnAcceptPaymentPage()
 {
    $merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
    $merchantAuthentication->setName(config('payments.authorize.login_id'));
    $merchantAuthentication->setTransactionKey(config('payments.authorize.transaction_key'));

    $refId = 'ref' . time();

    $transactionRequestType = new AnetAPI\TransactionRequestType();
    $transactionRequestType->setTransactionType("authCaptureTransaction");
    $transactionRequestType->setAmount("2050"); 

    $setting1 = new AnetAPI\SettingType();
    $setting1->setSettingName("hostedPaymentButtonOptions");
    $setting1->setSettingValue("{\"text\": \"Pay\"}");

    $setting2 = new AnetAPI\SettingType();
    $setting2->setSettingName("hostedPaymentOrderOptions");
    $setting2->setSettingValue("{\"show\": false}");

    $setting3 = new AnetAPI\SettingType();
    $setting3->setSettingName("hostedPaymentReturnOptions");
    $setting3->setSettingValue(
        "{\"url\": \"http://127.0.0.1:8000/authorize-success?refID\".$refID, \"cancelUrl\": \"http://127.0.0.1:8000/authorize-cancel\", \"showReceipt\": true}"
    );

    // Build transaction request
    $request = new AnetAPI\GetHostedPaymentPageRequest();
    $request->setMerchantAuthentication($merchantAuthentication);
    $request->setRefId($refId);
    $request->setTransactionRequest($transactionRequestType);

    $request->addToHostedPaymentSettings($setting1);
    $request->addToHostedPaymentSettings($setting2);
    $request->addToHostedPaymentSettings($setting3);

    $controller = new AnetController\GetHostedPaymentPageController($request);
    $response = $controller->executeWithApiResponse(\net\authorize\api\constants\ANetEnvironment::SANDBOX);

    if (($response != null) && ($response->getMessages()->getResultCode() == "Ok")) {

    } else {
        echo "ERROR :  Failed to get hosted payment page token\n";
        $errorMessages = $response->getMessages()->getMessage();
        echo "RESPONSE : " . $errorMessages[0]->getCode() . "  " .$errorMessages[0]->getText() . "\n";
    }
    return $response->getToken();

}

Now create routes into web.php as specified below.

web.php

Route::get('authorize-onboard', [\App\Http\Controllers\AuthorizePaymentController::class, 'onboard'])->name('authorize.init');

Route::get('authorize-success', [\App\Http\Controllers\AuthorizePaymentController::class, 'success']);

How it's going to work ?? (flow)

So initially we will call the route that contains that authorization form and also contains the payment information.

Here we are generating token before, generally, it should be generated from the payment screen.

The token will contains the payment information so while generating it make sure you are passing all the details properly.

Now when you submit the form it will redirect you to the authorized checkout page from where users can do payments and again redirect to the success screen.

Once Payment is done successfully you will be redirected to the success route URL with the RefID which is basically the transaction ID, and you can perform related actions on success action.

Hope it will help.

April 16, 20222 minutesuserVishal Ribdiya

Posts

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
Motivation

We often hear the term motivation. We all are human and that’s why we all have emotions and motivation is the driving force behind our behavior. Let’s discuss this in detail.

What is Motivation?

Motivation is the desire to act in service of the Goals. It’s the most crucial objective in setting and attaining business objectives.

We can define the motivation by the line in the book ‘The War Of Art’ written by The author Steven Pressfield “At some point, the pain of not doing it becomes greater than the pain of doing it.”

Motivation is a powerful weapon for any organization yet a tricky one. Sometimes it’s really easy to get motivated and motivate others, other times it's nearly impossible to figure out how to motivate oneself and others as well.

Every choice has a price but when employees are motivated it is easier to bear the inconvenience of action than the remaining same. In other words, employees are at the level ‘ It’s Easier To Change Than The Remaining Same’

Scientists define motivation as a general willingness to do something. It is the set of psychological forces that compel you to take action.

Common Misconception about motivation

How does motivation come?

We all have this misconception that motivation arrives as a result of watching motivational videos or reading inspirational books but one of the most surprising things is Motivation often comes AFTER starting new behavior not BEFORE. It’s the result of an action, not the cause of it.

I hope you get a basic understanding of Motivation. To know more about the motivation stay in tune with upcoming HR Blogs.

November 18, 20212 minutesauthorMariyam Bemat
Best practices for React JS developer part-2

In the previous article, we learned 5 areas or tips on Best practices for React JS developer.

In this article, we will learn more about areas or tips

  1. Object Destructuring.
  2. When pass value in props
  3. Tags close it self.
  4. Do not use underscore in any method name.
  5. Use alt in img tag.

Object distracting

You can use object distracting

Not Good

return (
  <>
   {user.firstName}
  </>  
)

Good

const { firstName } = user;
return (
  <>
   {firstName}
  </>  
)

When pass value in props

When pass the data between two component that time use camelCase for prop names.

Not Good

<Home
  UserName="demo"
  phone_number={9898989898}
/>

Good

<Home
  userName="demo"
  phoneNumber={9898989898}
/>

Tags close it self

Any component in not use children so closing it self

Not Good

<Home userName="demo"></Home>

Good

<Home
  userName="demo"
/>

Do not use underscore in any method name

You don't need underscores in any React method.

Not Good

const _onClickHandler = () => {
  // Your code
}

Good

const onClickHandler = () => {
  // Your code
}

Use alt attribute in img tag

Do use alt attribute in the img tag. and don’t use picture or image name in your alt property.

Not Good

<img src="hello.png" />

Good

<img src="hello.png" alt="This is hero image" />
December 01, 20213 minutesauthorVatsal Sakariya
Marketing Strategies to Increase Sales

Finding new customers or retargeting the previous customers to buy your products or services is an important part of the entire sales process.

It may be tough for every people of your target to buy your product or service but to increase sales, you find which strategy works for you and try to use different types of a strategy used for buyer's intent.

Do you have great products but may not increase sales as you want? That's okay so don't worry below techniques maybe work for you.

Use the following marketing strategies to increase sales and gain the right customer who can buy your products or services easily.

First of all, we define customer journey in various steps:

  1. Awareness of product
  2. Interest in products
  3. Evaluation of customer
  4. Commitment about product or services
  5. Sale products your buying intent person

Marketing strategies to increase sales

1. People want to benefit from buying products

People never buy products, they buy results that the product will give so start to identifier your customer and talk about the benefits of products.

Think you are buyers and you want to purchase products like TV so think about what benefits I will get If I buy a TV. Always people thoughts about If they buy a product from you then what benefits they will get and validity of the product.

2. Define customer

Who is the person who is interested in your products and buying them immediately?

Think about that person in your mind create a visual picture of that person.

Ask some specific questions

  1. How old are they?
  2. Are they male or female?
  3. Do they have children?
  4. How much money do they make?
  5. Do they have an education?
  6. The working field of the person?
  7. Are they interested in your products?

3. Create videos of products

Video of product can give some extra benefits over photos so try to create an amazing video of particular products working or anything else.

In digital marketing, video is most popular to attract customers to buy products.

Short video or long video marketers use this media to convert more leads.

Types of video content for different use

  • Client testimonials video
  • Product review video
  • Animation video
  • How to use products video
  • Videos for PPC advertising

4. Organic traffic through SEO

Create a blog content of products and describe of products in a blog how to use, which material used in this products, how they can benefit you, reviews of products, etc using best practices of SEO.

They take a long time to search for an appearance on first-page google but when it comes it gives you more benefits than paid services.

Best practices of SEO

  • Optimized your image or video
  • Best title tag that users can easily attract
  • Always try to get benefits of users
  • Create user-friendly content
  • Links to other pages on your website that might interest the viewer

5. Pick the right price for a product

If you pick a high price of products then market rates, so definitely your product doesn't sell so choose price customer can afford it and you will get some income using sell products.

Do market research on your competitor and pick the right price for your products.

If you can make your product seem superior to your competitors, you can charge a higher price as you want but first, do market research.

November 15, 20213 minutesauthorAnkit Kalathiya
Black Hat SEO Guide - Easy to Understand [2021]

In this chapter, learn about complete black hat SEO and solve your query related to this topic.

Black Hat SEO is a type of SEO technique that google doesn't recommend for sites ranking.

These techniques play with google algorithms and manipulate them for ranking in SERPs.

What is black hat SEO?

Black Hat SEO is totally against search engine guidelines that are used for website higher ranking in google SERP in a very short time.

Google does penalties that site that uses black hat SEO techniques for higher ranking in the search results.

What are black hat SEO techniques?

Black hat SEO techniques are techniques that manipulate google algorithms and play with the searcher's intent.

8 Different types of black hat SEO techniques

1. Use of paid links

Quality-related links drive traffic to websites also get ranking in search results page that's good.

People think if they buy backlinks from others then their websites get a higher ranking in google but paid links are against webmaster guidelines.

So that website never ranks but deindex in google is a high possibility.

So be avoid getting paid links from others that don't relevant to your niche.

If you do SEO for your site or client's website then avoid buying backlinks from others because google rank that site that matches user intent.

If buying links don't have quality content and do not match user intent that also affects your site so be aware when buying paid links.

2. Hidden text in a website

That is another black hat SEO technique that against search engine guidelines.

In white background put white text is a hidden text practice that user can't see but search engine crawler detects them and mark them as unwanted.

Putting text on behind images is also hidden text practice so avoid them getting penalties from Google.

Hidden text google guidelines

  • Don't use a font size as 0
  • Don't put text behind on image
  • Don't use white text for white background

3. Article spinning

Article spinning is a technique that re-writes content synonyms as source information using tools or manually.

Copy article from other sites and do article spinning of copy content and put a new article on website but if you think Google doesn't catch this technique then you are totally wrong because google's algorithm is more powerful than you think.

So be avoid doing article spinning of content and don't paste in websites.

4. Cloaking

Clocking provides different results than users and search engines expected a per search intent that is a violation of webmasters guideline.

Clocking is an old technique of black hat SEO but today as well use this technique by people to manipulate google's algorithm and get the top ranking on SERPs.

But Google can easily catch this technique using powerful algorithms and do penalties that websites that use this types of techniques for ranking.

5. Keyword stuffing

Use the same keyword use several times on one page for most visibility in SERPs it's called keyword stuffing.

Using this content doesn't like natural and user friendly.

Keywords use in articles that should be natural, don't put anywhere that like spamming content.

6. Duplicate content

Duplicate content is that content that is copied from different sources and merges into one content but search engines prefer unique content for the webpage so avoid this technique for better results.

Duplicate content can't rank in google so focus only on unique content.

7. Link Farming

Create a thousand quantity backlinks for ranking in google. But 99% of backlinks are spamming and usually use black hat software like Scrape box, SEnukeTNG to create spamming backlinks.

Backlinks like comment backlinks, social bookmarking backlinks, web profile, article directory, wiki backlinks, gov., and education sites backlinks are automatically created using this software.

If you want to use then there is 4 way to use backlinks

  1. Never use such backlinks on money sites. Use only on short-term micro-niche sites.
  2. Never use such backlinks on your main website
  3. Use it for 2 tier backlinks
  4. You can get brand mentions from selected sites on your main site but without a hyperlink

8. Content Farming

Generated automatic content on websites using activated plugins.

Two disadvantages of auto blogging

  1. Your visitor never become your audience
  2. Rare chances of ranking an auto blogging site on google

Is black hat SEO illegal?

Black hat SEO is not illegal but try to avoid use, which violet search engine guidelines or go against the rules.

If Google catches this technique then will get a penalty or punishment from google in cases your site rank can down or the site can be removed in search engine.

At some time your site can rank using black hat SEO techniques but when googling algorithm catch then suddenly down your site or maybe removed in search engine.

What is a black hat tool?

Black hat tool using this you can do keyword stuffing, link spam, buy unethical link, etc.

Black hat SEO tool list

  • XRumer
  • SeNukeXcr
  • Rankwyz
  • GSA Search Engine Ranker
  • Scrapebox
  • Market Samurai
  • The Best Spinner
  • Tweet Attacks
  • Traffic Booster Pro V3
  • GScraper

Does black hat SEO Still Work?

The answer is yes because some money-making sites use black hat SEO for their website and get ranked in search engines and make money from this.

When google penalty these sites that already make money from this and they don't worry about that.

But most of the sites are made for the long-term future and they worry about that so these techniques are only for short-term results. Don't get long time results using this.

What are black hat backlinks?

Black hat backlinks are types of black hat SEO using keyword stuffing, cloaking, content scraping made backlinks for the website.

These types of backlinks create a negative effect on google SERPs.

Why you shouldn't use black hat SEO?

Create short-time results using this technique.

Poor experience for users using this black hat SEO technique.

The site can deindex or disappear in SERPs.

Reputation and authority of website can be down.

Conclusion:

After that question in your mind is should we use some black hat SEO techniques for the website but the answer is no because black hat SEO is temporary and after some times googles algorithm capt them and down your site from the search engine.

November 11, 20213 minutesauthorMilan Gangani
Best practices for React JS developer

Today we are going to see best practices for React JS developer

  1. Passing a boolean variables.
  2. Do not define a function within a render
  3. Naming of the components
  4. Use of the Ternary Operators
  5. Don’t Need Curly Braces in string

Passing a boolean variables

Passing boolean variables in to two components.

Not Good

return (
   <Home showTitle={true}/>
); 

Good

return (
   <Home showTitle/>
); 

Do not define a function within a render

Don’t define a function inside render.

Not Good

return (
    <button onClick={() => dispatch(ACTION_TO_SEND_DATA)}>
      Example
    </button>  
)

Good

const submitData = () => dispatch(ACTION_TO_SEND_DATA)
return (
  <button onClick={submitData}>  
    Example 
  </button>  
)

Naming of the components

You can use PascalCase for name of the components and camelCase for name of the instances.

Not Good

import createCard from './CreateCard';
const ReservationItem = <ReservationCard />;

Good

import CreateCard from './CreateCard';
const reservationItem = <ReservationCard />;

Use of the Ternary Operators

Developer how can use ternary operator in React js.

Not Good

const { role } = user;
if(role === 'ADMIN') {
  return <AdminUser />
}else{
  return <NormalUser />
} 

Good

const { role } = user;
return role === 'ADMIN' ? <AdminUser /> : <NormalUser />

Don’t Need Curly Braces in string

When developer passing string props to a children component

Not Good

return(
  <Navbar title={"My Special App"} />
)

Good

return(
<Navbar title="My Special App" />  
)

Hope this helps for React js developer

November 06, 20213 minutesauthorVatsal Sakariya