承接 adrian1207/dotpay 相关项目开发

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

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

adrian1207/dotpay

Composer 安装命令:

composer require adrian1207/dotpay

包简介

Package for Dotpay payments via api instead of form

README 文档

README

Paczka Dotpay do Laravela 5.x. Pozwala przesyłać dane poprzez API zamiast formularza.

Scrutinizer Code Quality Build Status Latest Unstable Version License Total Downloads

Struktura

src/
tests/

Instalacja

Przez composera

$ composer require evilnet/dotpay

lub dodaj do pliku composera

 "require": {
         "evilnet/dotpay": "dev-master"
     },

Potem zarejestruj usługę i ewentualnie alias w config/app.php

'providers' => [

     Evilnet\Dotpay\DotpayServiceProvider::class,
 
 
 'aliases' => [
     'Dotpay' => Evilnet\Dotpay\Facades\Dotpay::class

Opublikuj konfguracje i wprowadź w niej potrzebne dane

php artisan vendor:publish --provider="Evilnet\Dotpay\DotpayServiceProvider"

Dodaj wartości do pliku .env

DOTPAY_USERNAME=
DOTPAY_PASSWORD=
DOTPAY_SHOP_ID=
DOTPAY_PIN=
DOTPAY_BASE_URL=https://ssl.dotpay.pl/test_seller/ 

I dodaj swoją metodę do obsługi callbacku jako wyjątek w VerifyCsrfToken

Przykład użycia

namespace App\Http\Controllers;

use Evilnet\Dotpay\DotpayManager;
use Illuminate\Http\Request;
use Illuminate\Http\Response;

class DotpayController extends Controller
{

    private $dotpayManager;

    public function __construct(DotpayManager $dotpayManager)
    {
        $this->dotpayManager = $dotpayManager;
    }

    public function callback(Request $request)
    {
        $response = $this->dotpayManager->callback($request->all());
        
        //Do whatever you want with this
        
        return new Response('OK');
    }

    public function pay()
    {
        $data = [
            'amount' => '100',
            'currency' => 'PLN',
            'description' => 'Payment for internal_id order',
            'control' => '12345', //ID that dotpay will pong you in the answer
            'language' => 'pl',
            'ch_lock' => '1',
            'url' => config('dotpay.options.url'),
            'urlc' => config('dotpay.options.curl'),
            'expiration_datetime' => '2017-12-01T16:48:00',
            'payer' => [
                'first_name' => 'John',
                'last_name' => 'Smith',
                'email' => 'john.smith@example.com',
                'phone' => '+48123123123'
            ],
            'recipient' => config('dotpay.options.recipient')

        ];

        return redirect()->to($this->dotpayManager->createPayment($data));
    }
}

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ phpunit vendor/evilnet/dotpay/tests

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email axotion@linux.pl instead of using the issue tracker.

Credits

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-12-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固