Closed timint closed 7 years ago
Hi!
It's not mandatory to use Svea Checkout if you are upgrading to a later version than 3.0.0, however the integration package that gives support to Svea Checkout is a package that is mandatory.
However you are free to use any of the other payment methods, the package only adds functionality to php-integration.
Now onto your problem, if you don't want to upgrade past 3.0.0, you can go and add the following line $methods[] = SystemPaymentMethod::SVEACARDPAY;
to the file "/src/HostedService/Payment/DirectPayment.php" below the line
$methods[] = SystemPaymentMethod::SKRILL;
which is on line 50 in 3.2.1 (not sure about 3.0.0 but it should be the same)
Doing this should remove the card methods, also make sure that you are using a merchantId that has directbanks configured otherwise they won't appear like they are in the picture that you are provided.
If you want to test this out you can use the merchantId 1130, which should yield this result:
I will commit an fix for this so that it will be added to a later release.
Thanks for reporting this and have a nice day!
Kind regards, Fredrik
Thank you Fredrik for replying..
We have previously rewritten the modules 4 or 5 times. That's how many different API:s Svea had just through the recent years. The reason why we ended up using the integration package is because all those API documentations that were phased out could drive a man insane. Bascially we were told that this was the best move where we wouldn't need to worry about API's being phased out in the future.
Now regarding upgrading 3.0.0 to a higher version. In issue ticket #72 TXC said
this repository is using "Svea Checkout" as a dependency
I can't load up any payment method without getting the error:
require_once(Svea\Checkout\Transport\Connector.inc.php): failed to open stream: No such file or directory
Back to this thread's topic. I added the line accoarding to your instructions and the client is now receiving a new error:
No valid paymentmethods.
Here is the modified code:
protected function configureExcludedPaymentMethods()
{
// first, exclude all invoice/paymentplan payment methods
$methods = ExcludePayments::excludeInvoicesAndPaymentPlan();
//card
$methods[] = SystemPaymentMethod::KORTCERT;
$methods[] = SystemPaymentMethod::SKRILL;
$methods[] = SystemPaymentMethod::SVEACARDPAY; // <------ Added
//other
$methods[] = SystemPaymentMethod::PAYPAL;
return $methods;
}
The "php-checkout" is a dependency because it's required in order to communicate with the checkout api, if we didn't include it our composer file as a dependency users would be required to download the php-checkout seperatly or we would have to maintain the same code in two different repositories.
Can you send me your merchantId to our support mail? Support-webpay@sveaekonomi.se
Mail sent.
As for the checkout dependancy let's continue the discussion in a dedicated thread. I'll open one and provide some feedback.
Major issue here using usePayPageDirectBankOnly() a link to a CardPay payment window is generated. Expected was a link to a direct bank payment window.
Using 3.0.0.
Please note: All clients are unable to upgrade because they are not using Svea Checkout which I am told is a mandatory dependancy if upgrading from "php-integration 3.0.0".
Gives
Where do we go from here?