承接 krugerdavid/laravel-pagopar 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

krugerdavid/laravel-pagopar

最新稳定版本:v1.0.0

Composer 安装命令:

composer require krugerdavid/laravel-pagopar

包简介

Laravel integration for Pagopar payment gateway

README 文档

README

Latest Version on Packagist GitHub Tests Action Status Total Downloads License

Laravel integration for Pagopar payment gateway.

Installation

You can install the package via composer:

composer require krugerdavid/laravel-pagopar

The service provider will automatically register itself.

You can publish the config file with:

php artisan vendor:publish --tag="pagopar-config"

Configuration

Add these variables to your .env file:

PAGOPAR_PUBLIC_KEY=your_public_token
PAGOPAR_PRIVATE_KEY=your_private_token

Usage

Creating a Payment

use KrugerDavid\Pagopar\Facades\Pagopar;
use KrugerDavid\Pagopar\DTOs\PagoparBuyer;
use KrugerDavid\Pagopar\DTOs\PagoparItem;
use KrugerDavid\Pagopar\DTOs\PagoparPaymentRequest;

$buyer = new PagoparBuyer(
    name: 'Juan Perez',
    email: 'juan@example.com',
    document: '1234567',
    phone: '+595981123456'
);

$items = [
    new PagoparItem(
        name: 'Producto de Prueba',
        price: 10000,
        quantity: 1
    )
];

$request = new PagoparPaymentRequest(
    orderId: 'ORDER-123',
    buyer: $buyer,
    items: $items,
    maxPaymentDate: now()->addDays(2)->format('Y-m-d H:i:s'),
    description: 'Descripción del pedido'
);

$response = Pagopar::createPayment($request);

if ($response['hash']) {
    $checkoutUrl = Pagopar::getCheckoutUrl($response['hash']);
    return redirect($checkoutUrl);
}

Checking Order Status

$status = Pagopar::getOrderStatus($hash);

if (!empty($status) && $status[0]['pagado']) {
    // El pedido ha sido pagado
}

Verifying Webhook Token

public function handleWebhook(Request $request)
{
    $hash = $request->input('resultado.0.hash_pedido');
    $token = $request->input('resultado.0.token');

    if (Pagopar::verifyWebhookToken($hash, $token)) {
        // Token válido, procesar el pago
    }
}

Security

If you discover any security related issues, please email david.kruger@duplaa.com instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-19