Skip to content

Commit

Permalink
Adding iDeal Fast Checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
ShuCh3n committed May 3, 2024
1 parent 492bebb commit f3d8db1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
4 changes: 3 additions & 1 deletion src/PaymentMethods/iDeal/iDeal.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ public function pay(?Model $model = null)
* @return TransactionResponse
*/
public function payFastCheckout(?Model $model = null)
{
{

Check failure on line 61 in src/PaymentMethods/iDeal/iDeal.php

View workflow job for this annotation

GitHub Actions / PHP 7.4 - prefer-stable -

Whitespace found at end of line

Check failure on line 61 in src/PaymentMethods/iDeal/iDeal.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 - prefer-stable -

Whitespace found at end of line

Check failure on line 61 in src/PaymentMethods/iDeal/iDeal.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 - prefer-stable -

Whitespace found at end of line

Check failure on line 61 in src/PaymentMethods/iDeal/iDeal.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 - prefer-stable -

Whitespace found at end of line
$this->setPayPayload();

$this->request->setData('order', '');

$this->setServiceList('PayFastCheckout', $model ?? new Pay($this->payload));

return $this->postRequest();
Expand Down
32 changes: 23 additions & 9 deletions tests/Buckaroo/Payments/IdealTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@
use Buckaroo\Config\Config;


class CustomConfig extends Config
{
public function __construct()
{
$websiteKey = 'Set Key';
$secretKey = 'From other resources like DB/ENV/Platform Config';
// class CustomConfig extends Config
// {
// public function __construct()
// {
// $websiteKey = 'Set Key';
// $secretKey = 'From other resources like DB/ENV/Platform Config';

parent::__construct($websiteKey, $secretKey);
}
}
// parent::__construct($websiteKey, $secretKey);
// }
// }

class IdealTest extends BuckarooTestCase
{
Expand Down Expand Up @@ -105,6 +105,20 @@ public function it_creates_a_ideal_payment()
$this->assertTrue($response->isPendingProcessing());
}

/**
* @return void
* @test
*/
public function it_creates_a_ideal_fast_checkout_payment()
{
$response = $this->buckaroo->method('ideal')->payFastCheckout([
'amountDebit' => 10.10,
'invoice' => uniqid(),
]);

$this->assertTrue($response->isWaitingOnUserInput());
}

/**
* @test
*/
Expand Down

0 comments on commit f3d8db1

Please sign in to comment.