2017 © Pedro Peláez
 

library laravel-dotpay

A laravel dotpay

image

liteweb/laravel-dotpay

A laravel dotpay

  • Wednesday, November 22, 2017
  • by liteweb
  • Repository
  • 1 Watchers
  • 0 Stars
  • 119 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 8 % Grown

The README.md

Laravel Dotpay

Build Status styleci Scrutinizer Code Quality SensioLabsInsight Coverage Status, (*1)

Packagist Packagist Packagist, (*2)

Instalacja

Przez composera, (*3)

composer require liteweb/laravel-dotpay

lub, (*4)

Dodaj rezpozytorium do composer.json, (*5)


"require": { "liteweb/laravel-dotpay": "dev-master" }, "repositories": [ { "type": "vcs", "url": "git@github.com:liteweb-io/laravel-dotpay.git" } ]

Zarejestruj service provider

Note! This and next step are optional if you use laravel>=5.5 with package auto discovery feature., (*6)

Liteweb\LaravelDotpay\ServiceProvider::class,

Opublikuj plik konfiguracyjny

php artisan vendor:publish --provider="Liteweb\LaravelDotpay\ServiceProvider" --tag="config"

Użycie

Predefiniowany routing, (*7)

/dotpay/callback POST

Następnie edytuj plik konfiguracyjny i dodaj zmienne do .ENV, (*8)


DOTPAY_USERNAME= DOTPAY_PASSWORD= DOTPAY_SHOP_ID= DOTPAY_PIN= DOTPAY_BASE_URL= DOTPAY_URL= DOTPAY_CURL= DOTPAY_EXPIRATION_DATETIME=

Utwórz metodę która będzie kreowała płatność, (*9)

Przykład, (*10)


public function pay(Request $request) { $data = [ 'amount' => '100', 'currency' => 'PLN', 'description' => 'Payment for internal_id order', 'control' => $transaction->id, //ID that dotpay will pong you in the answer 'language' => 'pl', 'payer' => [ 'first_name' => 'John', 'last_name' => 'Smith', 'email' => 'john.smith@example.com', 'phone' => '+48123123123' ], ]; $response = $this->dotpayApi->createPayment(new Payment($data)); return $response->getPaymentUrl(); }

Dane do wysłania, (*11)

 {
 "amount" : "100",
 "currency" : "PLN",
 "description" : "Payment for internal_id order",
 "control" : "12345", 
 "language" : "pl",
 "payer" : {
                 "first_name" : "John",
                 "last_name" : "Smith",
                 "email" : "john.smith@example.com",
                 "phone" : "+48123123123"
           }

}

Event na dotpay callback, (*12)

DotpayCallbackEvent

I gotowe, (*13)

Security

If you discover any security related issues, please email instead of using the issue tracker., (*14)

Credits

This package is bootstrapped with the help of melihovv/laravel-package-generator., (*15)

The Versions

22/11 2017

dev-master

9999999-dev

A laravel dotpay

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar liteweb

laravel dotpay

22/11 2017

1.1

1.1.0.0

A laravel dotpay

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar liteweb

laravel dotpay

21/11 2017

1.0

1.0.0.0

A laravel dotpay

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar liteweb

laravel dotpay