alexm Posted November 27, 2022 Share Posted November 27, 2022 I have invoice payments disabled and I'm checking out using Stripe. On checkout success I get the error: User Error Exception: Shop does not accept invoice payments! (in /site/modules/Padloper/includes/order/PadloperCheckout.php line 590) Any thoughts please. Latest version of Padloper and PW version 3.0.203 as latest version causes issues with Padloper. Thanks in advance Link to comment Share on other sites More sharing options...
alexm Posted November 27, 2022 Author Share Posted November 27, 2022 Just to clarify. I'm using custom form fields. I've used both shipping and billing fields. I have only Stripe active. On the backend, I checked Invoice and PayPayl and set them to inactive. That is all I've done. Other than that, the setup is the same as or follows extremely closely the github examples Link to comment Share on other sites More sharing options...
alexm Posted November 27, 2022 Author Share Posted November 27, 2022 It's something to do with this check. If I enable invoice as a payment option there is no error. The issue is, I don't want invoice enabled really. But for now I'll just output only Stripe as a payment method rather than loop active payment methods. // --------------- // CHECK IF THIS ORDER HAS BEEN PAID // we check the payment status // @NOTE: WE ONLY CHECK FOR NON INVOICE ORDERS! $orderPaymentStatus = $response->order->paymentStatus; if (empty($this->isInvoiceOrder())) { // NON-INVOICE PAYMENT CHECK // @TODO CHANGGE THIS! // if (empty($order->padloper_order->pad_paid)) { // @TODO AMEND AS PER NEW APPROACH OF CONFIRMING SUCCESS IN GETCOMPLETEDORDER -> CAN EVEN CHECK THERE! if ((int) $orderPaymentStatus !== self::PAYMENT_STATUS_PAID) { // ORDER NOT PAID FOR BUT NOT INVOICE ORDER!, THROW EXCEPTION throw new Wire404Exception($this->_("Invalid order")); } } else { // INVOICE PAYMENTS CHECK // check if shop accepts invoice payments! if (empty($this->isShopAcceptsInvoicePayments())) { throw new WireException($this->_("Shop does not accept invoice payments!")); } } Link to comment Share on other sites More sharing options...
kongondo Posted November 27, 2022 Share Posted November 27, 2022 (edited) I'll have a look. From what I can see, for some reason your payment is being considered an invoice payment. Since your shop doesn't accept invoice payments, the error is thrown. I need to find out why your Stripe payments are being 'classified' as invoice payments by the check. Edited November 27, 2022 by kongondo 1 Link to comment Share on other sites More sharing options...
alexm Posted November 27, 2022 Author Share Posted November 27, 2022 It's most peculiar. However, to be honest, it's not really an issue as I've just grabbed the stripe payment page and output that particular payment method. Cheers man Link to comment Share on other sites More sharing options...
kongondo Posted November 27, 2022 Share Posted November 27, 2022 Hey @alexm. Found the problem. The issue was that by the time we were checking the session whether this was an invoice order or not we had already cleared the session plus we were return the opposite of that, hence !null became true. This meant it was always returning that the order was an invoice order...etc. I'll try and push tonight...I must warn you though, there is the little matter of a spherical leather object ...?. If you need this ASAP, I can email you the amended file. 1 Link to comment Share on other sites More sharing options...
alexm Posted November 27, 2022 Author Share Posted November 27, 2022 @kongondo Nice one!! Legendary work as usual. No drama pushing it mate I've got invoicing enabled anyways haha! Enjoy the footy!! It's a biggy too. 1 Link to comment Share on other sites More sharing options...
kongondo Posted January 8, 2023 Share Posted January 8, 2023 Hi @alexm, Fixed in Padloper 008 released today. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now