Page MenuHomePhorge

Mollie payments
ClosedPublic

Authored by machniak on Mar 17 2020, 11:27 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 24, 5:07 AM
Unknown Object (File)
Tue, Apr 23, 7:12 AM
Unknown Object (File)
Mon, Apr 8, 2:10 AM
Unknown Object (File)
Fri, Apr 5, 4:03 PM
Unknown Object (File)
Thu, Apr 4, 2:20 AM
Unknown Object (File)
Sat, Mar 30, 9:57 AM
Unknown Object (File)
Fri, Mar 29, 12:11 AM
Unknown Object (File)
Thu, Mar 28, 9:03 AM
Subscribers
None

Details

Summary

Integration with Payment provider Mollie

Diff Detail

Repository
rK kolab
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

machniak created this revision.
vanmeeuwen added inline comments.
src/app/Console/Commands/WalletCharge.php
58

This automatic charging will be subject to the user entering in to such agreement.

Supposedly, the agreement would be formulated as follows:

[ ] Automatically top up my balance with [ $x ] CHF if the balance falls below [ $y ] CHF.
src/app/Http/Controllers/API/PaymentsController.php
131

Please clarify the circumstances that lead to $payment->hasRefunds()?

135

Please clarify the circumstances that lead to $payment->hasChargebacks()?

src/app/Jobs/WalletPayment.php
49

We probably should not charge the customer with the wallet's current balance and increase the wallet's balance to 0.

See also the earlier comment.

src/app/Observers/WalletObserver.php
66

Is this because of the referential integrity by foreign key?

src/app/Wallet.php
96

No additional whitespace is needed here, right?

src/database/migrations/2020_03_16_100000_create_payments.php
27

This could be debatable.

This revision now requires changes to proceed.Mar 18 2020, 3:24 PM
  • Tests for payments controller
  • Browser test for payment with Mollie

This differential would preferably be rebased on to current origin/master HEAD.

Also, there's a test failure;

$ php -dzend_extension=xdebug.so vendor/bin/phpunit 
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.

............II.......I.IIII.........IIIII...........I..........  63 / 189 ( 33%)
.............I......I...I.I...................I................ 126 / 189 ( 66%)
..III..IIII...I.I.I........................E................... 189 / 189 (100%)


Time: 3.27 minutes, Memory: 68.50 MB

There was 1 error:

1) Tests\Browser\PaymentTest::testPayment
Facebook\WebDriver\Exception\TimeoutException: Waited 5 seconds for selector [#container].

/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/laravel/dusk/src/Concerns/WaitsForElements.php:291
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/laravel/dusk/src/Concerns/WaitsForElements.php:44
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/tests/Browser/Pages/PaymentMollie.php:28
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/laravel/dusk/src/Browser.php:187
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/tests/Browser/PaymentTest.php:51
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:68
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/tests/Browser/PaymentTest.php:79

ERRORS!
Tests: 189, Assertions: 2077, Errors: 1, Incomplete: 28.

Generating code coverage report in HTML format ... done
This revision now requires changes to proceed.Mar 20 2020, 9:59 AM
  • Set locale for Mollie to fix browser test
  • Reset mollie_id when testing payment
  • The proxy on 127.0.0.1 can be trusted
  • Added APP_PUBLIC_URL setting
  • Change webhook location to fix auth issue
  • RedirectUrl don't have to public
This revision is now accepted and ready to land.Mar 20 2020, 2:48 PM
This revision was automatically updated to reflect the committed changes.