Tips 2checkout in Laravel payment gateway integration method in urdu

** 2checkout trong phương thức tích hợp cổng thanh toán Laravel trong tiếng Urdu **

**Giới thiệu**

Laravel là một khung PHP phổ biến để phát triển web.Nó được biết đến với sự đơn giản, thanh lịch và hiệu suất.2Checkout là một cổng thanh toán cho phép các doanh nghiệp chấp nhận thanh toán trực tuyến.Đây là một lựa chọn phổ biến cho các doanh nghiệp thuộc mọi quy mô, vì nó cung cấp nhiều tính năng và tùy chọn tích hợp.

Trong hướng dẫn này, chúng tôi sẽ chỉ cho bạn cách tích hợp 2Checkout với Laravel.Chúng tôi sẽ đề cập đến các chủ đề sau:

* Tạo tài khoản 2Checkout
* Cài đặt gói Laravel 2Checkout
* Định cấu hình gói Laravel 2checkout
* Tích hợp 2Checkout với ứng dụng Laravel của bạn

** Điều kiện tiên quyết **

Để làm theo hướng dẫn này, bạn sẽ cần những điều sau đây:

* Một ứng dụng Laravel
* Tài khoản 2Checkout
* Thẻ tín dụng hoặc thẻ ghi nợ để kiểm tra tích hợp của bạn

** Tạo tài khoản 2Checkout **

Để tạo tài khoản 2Checkout, hãy truy cập [trang web 2CheckOut] (https://www.2checkout.com/) và nhấp vào nút ** Đăng ký **.Nhập địa chỉ email và mật khẩu của bạn, sau đó nhấp vào nút ** Tạo tài khoản **.

Sau đó, bạn sẽ được nhắc nhập thông tin kinh doanh của bạn.Khi bạn đã nhập thông tin của mình, nhấp vào nút ** Tiếp tục **.

2Checkout bây giờ sẽ gửi cho bạn một xác nhận email.Nhấp vào liên kết trong email để xác minh tài khoản của bạn.

** Cài đặt gói Laravel 2Checkout **

Để cài đặt gói Laravel 2Checkout, hãy chạy lệnh sau trong thư mục gốc của ứng dụng Laravel của bạn:

`` `
Trình soạn thảo yêu cầu 2Checkout/Laravel
`` `

Điều này sẽ cài đặt gói 2Checkout Laravel vào các phụ thuộc của ứng dụng của bạn.

** Định cấu hình gói Laravel 2checkout **

Để định cấu hình gói 2Checkout Laravel, hãy mở tệp `config/Services.php` của ứng dụng và thêm mã sau:

`` `PHP
'2checkout' => [
'mode' => env ('2checkout_mode', 'hộp cát'),
'client_id' => env ('2checkout_client_id'),
'Secret_key' => env ('2checkout_secret_key'),
],
`` `

Bạn sẽ cần thay thế các giá trị sau bằng của riêng bạn:

* `2checkout_mode`: Chế độ bạn muốn sử dụng.Giá trị mặc định là `hộp cát`.
* `2checkout_client_id`: ID máy khách 2checkout của bạn.
* `2checkout_secret_key`: Khóa bí mật 2Checkout của bạn.

** Tích hợp 2checkout với ứng dụng Laravel của bạn **

Để tích hợp 2checkout với ứng dụng Laravel của bạn, bạn sẽ cần tạo trang thanh toán.Trang này sẽ cho phép khách hàng của bạn nhập thông tin thanh toán của họ và hoàn thành việc mua hàng của họ.

Để tạo trang thanh toán, hãy tạo một tệp mới trong thư mục `resource/lượt xem` của ứng dụng được gọi là `Checkout.blade.php`.Sau đó, thêm mã sau vào tệp:

`` `HTML
<! DOCTYPE HTML>
<html lang = "en">
<Đầu>
<meta charet = "utf-8">
không
<Title> 2Checkout Checkout </Tiêu đề>
</head>
<Body>
không
@CSRF

<Div>
<nhãn cho = "số thẻ"> số thẻ </nhãn>
không
</div>

<Div>
không
không
</div>

<Div>
không
<input type = "text" id = "card-cvv" name = "card_cvv" yêu cầu>
</div>

<Div>
<nút loại = "Gửi"> Thanh toán ngay </nút>
</div>
</Form>
</Body>
</html>
`` `

Mã này sẽ tạo một trang thanh toán đơn giản với ba trường đầu vào cho số thẻ, ngày hết hạn và CVV.

Bạn cũng sẽ cần tạo một tuyến đường cho trang thanh toán.Để thực hiện việc này, hãy mở tệp `Routes/Web.php` của ứng dụng và thêm mã sau:

`` `PHP
=======================================
**2Checkout in Laravel Payment Gateway Integration Method in Urdu**

**Introduction**

Laravel is a popular PHP framework for web development. It is known for its simplicity, elegance, and performance. 2Checkout is a payment gateway that allows businesses to accept payments online. It is a popular choice for businesses of all sizes, as it offers a variety of features and integration options.

In this tutorial, we will show you how to integrate 2Checkout with Laravel. We will cover the following topics:

* Creating a 2Checkout account
* Installing the 2Checkout Laravel package
* Configuring the 2Checkout Laravel package
* Integrating 2Checkout with your Laravel application

**Prerequisites**

To follow this tutorial, you will need the following:

* A Laravel application
* A 2Checkout account
* A credit card or debit card to test your integration

**Creating a 2Checkout Account**

To create a 2Checkout account, visit the [2Checkout website](https://www.2checkout.com/) and click the **Sign Up** button. Enter your email address and password, and then click the **Create Account** button.

You will then be prompted to enter your business information. Once you have entered your information, click the **Continue** button.

2Checkout will now send you an email confirmation. Click the link in the email to verify your account.

**Installing the 2Checkout Laravel Package**

To install the 2Checkout Laravel package, run the following command in your Laravel application's root directory:

```
composer require 2checkout/laravel
```

This will install the 2Checkout Laravel package to your application's dependencies.

**Configuring the 2Checkout Laravel Package**

To configure the 2Checkout Laravel package, open your application's `config/services.php` file and add the following code:

```php
'2checkout' => [
'mode' => env('2CHECKOUT_MODE', 'sandbox'),
'client_id' => env('2CHECKOUT_CLIENT_ID'),
'secret_key' => env('2CHECKOUT_SECRET_KEY'),
],
```

You will need to replace the following values with your own:

* `2CHECKOUT_MODE`: The mode that you want to use. The default value is `sandbox`.
* `2CHECKOUT_CLIENT_ID`: Your 2Checkout client ID.
* `2CHECKOUT_SECRET_KEY`: Your 2Checkout secret key.

**Integrating 2Checkout with your Laravel Application**

To integrate 2Checkout with your Laravel application, you will need to create a checkout page. This page will allow your customers to enter their payment information and complete their purchase.

To create a checkout page, create a new file in your application's `resources/views` directory called `checkout.blade.php`. Then, add the following code to the file:

```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>2Checkout Checkout</title>
</head>
<body>
<form action="{{ route('checkout.store') }}" method="post">
@csrf

<div>
<label for="card-number">Card Number</label>
<input type="text" id="card-number" name="card_number" required>
</div>

<div>
<label for="card-expiration-date">Card Expiration Date</label>
<input type="text" id="card-expiration-date" name="card_expiration_date" required>
</div>

<div>
<label for="card-cvv">Card CVV</label>
<input type="text" id="card-cvv" name="card_cvv" required>
</div>

<div>
<button type="submit">Pay Now</button>
</div>
</form>
</body>
</html>
```

This code will create a simple checkout page with three input fields for the card number, expiration date, and CVV.

You will also need to create a route for the checkout page. To do this, open your application's `routes/web.php` file and add the following code:

```php
 
Join ToolsKiemTrieuDoGroup
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock