-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from gopaycommunity/hotfix/GPMAIN-7759-bnpl
Hotfix/gpmain 7759 bnpl
- Loading branch information
Showing
5 changed files
with
52 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# IDE | ||
/nbproject/ | ||
.idea | ||
/gopay-php-api.iml | ||
|
||
# APP | ||
/vendor/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module version="4"> | ||
<component name="SonarLintModuleSettings"> | ||
<option name="uniqueId" value="2d2c7470-064f-4688-a062-16b8bfd62359" /> | ||
</component> | ||
</module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace GoPay\Definition\Payment; | ||
|
||
class BnplType | ||
{ | ||
const DEFERRED_PAYMENT = 'DEFERRED_PAYMENT'; | ||
const PAY_IN_THREE = 'PAY_IN_THREE'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
require_once 'TestUtils.php'; | ||
|
||
use GoPay\Definition\Language; | ||
use GoPay\Definition\Payment\BnplType; | ||
use GoPay\Definition\Payment\Currency; | ||
use GoPay\Definition\Payment\PaymentInstrument; | ||
use GoPay\Definition\Payment\BankSwiftCode; | ||
|
@@ -34,33 +35,41 @@ protected function setUp(): void | |
public static function createBasePayment() | ||
{ | ||
$basePayment = [ | ||
'payer' => [ | ||
'allowed_payment_instruments' => [ | ||
PaymentInstrument::BANK_ACCOUNT, | ||
PaymentInstrument::PAYMENT_CARD | ||
'payer' => [ | ||
'allowed_payment_instruments' => [ | ||
PaymentInstrument::BANK_ACCOUNT, | ||
PaymentInstrument::PAYMENT_CARD, | ||
# PaymentInstrument::TWISTO, | ||
# PaymentInstrument::SKIPPAY | ||
], | ||
# 'allowed_bnpl_types' => [ | ||
# BnplType::DEFERRED_PAYMENT, | ||
# BnplType::PAY_IN_THREE | ||
# ], | ||
# 'default_bnpl_type' => BnplType::DEFERRED_PAYMENT, | ||
# 'default_payment_instrument' => PaymentInstrument::TWISTO | ||
'allowed_swifts' => [BankSwiftCode::RAIFFEISENBANK, BankSwiftCode::CESKA_SPORITELNA], | ||
# 'default_swift' => BankSwiftCode::FIO_BANKA, | ||
# 'default_payment_instrument' => PaymentInstrument::BANK_ACCOUNT, | ||
'contact' => [ | ||
'email' => '[email protected]', | ||
], | ||
], | ||
'allowed_swifts' => [BankSwiftCode::RAIFFEISENBANK, BankSwiftCode::CESKA_SPORITELNA], | ||
//'default_swift' => BankSwiftCode::FIO_BANKA, | ||
//'default_payment_instrument' => PaymentInstrument::BANK_ACCOUNT, | ||
'contact' => [ | ||
'email' => '[email protected]', | ||
'order_number' => '9876', | ||
'amount' => 2300, | ||
'currency' => Currency::CZECH_CROWNS, | ||
'order_description' => '9876Description', | ||
'lang' => Language::CZECH, | ||
'additional_params' => [ | ||
array('name' => 'invoicenumber', 'value' => '2015001003') | ||
], | ||
'items' => [ | ||
['name' => 'item01', 'amount' => 2300, 'count' => 1], | ||
], | ||
'callback' => [ | ||
'return_url' => 'https://eshop123.cz/return', | ||
'notification_url' => 'https://eshop123.cz/notify' | ||
], | ||
], | ||
'order_number' => '9876', | ||
'amount' => 2300, | ||
'currency' => Currency::CZECH_CROWNS, | ||
'order_description' => '9876Description', | ||
'lang' => Language::CZECH, | ||
'additional_params' => [ | ||
array('name' => 'invoicenumber', 'value' => '2015001003') | ||
], | ||
'items' => [ | ||
['name' => 'item01', 'amount' => 2300, 'count' => 1], | ||
], | ||
'callback' => [ | ||
'return_url' => 'https://eshop123.cz/return', | ||
'notification_url' => 'https://eshop123.cz/notify' | ||
], | ||
]; | ||
|
||
return $basePayment; | ||
|