Closed lakrisgubben closed 3 years ago
Here I went with throwing a \SwedbankPay\Core\Exception
instead of a standard Exception
since that's what WC_Gateway_Swedbank_Pay_Cc::ajax_check_payment
is expecting. But maybe it's better to throw a standard Exception
and change WC_Gateway_Swedbank_Pay_Cc::ajax_check_payment
instead? Happy for input here since I'm not so familiar with when the different Exceptions should be thrown.. :)
Looks like the failing tests have to do with missing env-vars.. Not sure what to do about that. :)
But as you can see the test run on the first commit has one error which the test run on the second does not have.
Thanks, @lakrisgubben! The missing environment variables are due to the PR being run from a fork:
Note: With the exception of
GITHUB_TOKEN
, secrets are not passed to the runner when a workflow is triggered from a forked repository.
Thank you @lakrisgubben for your contribution!
see https://github.com/SwedbankPay/swedbank-pay-woocommerce-payments/issues/112
This PR is two commits, the first one is a test that tries to run WC_Swedbank_Pay_Transactions::import twice on the same order where the second attempt will fail. The second commit tries to fix that failure.