Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

mhsuffolk

Members
  • Content count

    480
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by mhsuffolk

  1. mhsuffolk

    Stripe v3 module for SCA

    @14steve14 I believe it is just 3 ext/modules/payment/stripe_sca/payment_intent.php ext/modules/payment/stripe_sca/webhook.php includes/modules/payment/stripe_sca.php
  2. mhsuffolk

    Stripe v3 module for SCA

    Yes my database still contains MODULE_PAYMENT_STRIPE_SCA_SECRET_KEY but it has the correct live key stored. I have tried your modifications in payment_intent.php and webhook.php. Now it does not produce that error in the server log, the transaction completes and is stored in the database, but the card is not saved. Webhook comes back with a 500 error in Stripes dashboard logs.
  3. mhsuffolk

    Stripe v3 module for SCA

    Yes, that could be the problem. I have the old module installed but turned off.
  4. mhsuffolk

    Stripe v3 module for SCA

    Oops, another bug. In test mode if I try to save a card whilst checking out it hangs. The order appears in admin in preparing status and I get this in the servers error log. [14-Sep-2019 07:22:01 Europe/London] PHP Fatal error: Uncaught Stripe\Error\InvalidRequest: No such payment_intent: pi_xxxxxxxxxxxx; a similar object exists in test mode, but a live mode key was used to make this request. in /home/*******/public_html/includes/modules/payment/stripe_sca/lib/ApiRequestor.php:210 from API request 'req_*************' Stack trace: #0 /home/******/public_html/includes/modules/payment/stripe_sca/lib/ApiRequestor.php(173): Stripe\ApiRequestor::_specificAPIError('{\n "error": {\n...', 404, Object(Stripe\Util\CaseInsensitiveArray), Array, Array) #1 /home/*******/public_html/includes/modules/payment/stripe_sca/lib/ApiRequestor.php(473): Stripe\ApiRequestor->handleErrorResponse('{\n "error": {\n...', 404, Object(Stripe\Util\CaseInsensitiveArray), Array) #2 /home/*******/public_html/includes/modules/payment/stripe_sca/lib/ApiRequestor.php(126): Stripe\ApiRequestor->_interpretResponse('{\n "error": {\n...', 404, Object(Stripe\Util\CaseInsensitiveArray)) #3 /home/********/public_html/includes/modules/payment/stripe_sca/lib/ApiResource.ph in /home/mhunt/public_html/includes/modules/payment/stripe_sca/lib/ApiRequestor.php on line 210 I have not tested in live mode but possibly the reverse error would exist. Also I have not yet tried to use a stored card.
  5. mhsuffolk

    Stripe v3 module for SCA

    Yes v1.0.5
  6. mhsuffolk

    Stripe v3 module for SCA

    No problem with confirmation emails here.
  7. mhsuffolk

    Stripe v3 module for SCA

    The developer @asro2004 is in New Zealand. He is normally active on the forums early morning UK time. I am sure he will have some ideas.
  8. mhsuffolk

    Stripe v3 module for SCA

    Forgive me if you have done this already. Are you using version 1.0.5 from here. https://apps.oscommerce.com/Get&EbCL1&fKidG There should be six boxes in admin where keys have to be added, and they are all different, earlier versions had less.
  9. mhsuffolk

    Stripe v3 module for SCA

    Click on Developers in the Stripe dashboard. At the bottom of the screen have you any errors. This was when I was testing, I get none in my live shop. If you hover over any errors a pop up appears, click the errors line of that pop up. You will get a list of failed webhooks, click on one and report back the contents of the Response box. Example above.
  10. mhsuffolk

    Stripe v3 module for SCA

    Did you add both events 'payment_intent.succeeded' and 'payment_intent.payment_failed' to both live and test webhooks when you created them? If not click "Update Details"
  11. mhsuffolk

    Stripe v3 module for SCA

    That area is created starting Line 346 of includes/modules/payment/stripe_sca.php My understanding is that of the line where the customer actually inputs the card number, date and CVC is put there by the Stripe server, that is how it is PCI compliant because customers card details do not touch your server. I do not think that that can be changed.
  12. mhsuffolk

    Stripe v3 module for SCA

    Just had an email from Stripe reminding us to update for SCA and stating that there is an updated module available. That will be the one in this thread. Their dashboard also states that OSCommerce has been updated for SCA. Many thanks to @asro2004 for all the work involved, I just did a bit of testing. The new module can use existing card tokens saved by the old module, which can now be switched off.
  13. mhsuffolk

    Stripe v3 module for SCA

    Found the fault. The Webhook secret keys fields in admin are transposed or not correct. Tested by having module in test mode and putting the test WH secret key in the live field and it successfully performed a test transaction. Have not tried a live one. Sending a test webhook works as well now.
  14. mhsuffolk

    Stripe v3 module for SCA

    I am at a loss. The URL in the webhook is the same for both live and test. I have reverted to 1.0.2, done a test transaction, all works correctly, no errors in the webhook log says 200 payment intent suceeded. However if I send a test webhook it fails even though the test transaction worked. I have not tested 1.0.3 in live mode but I have had a 1.0.2 live transaction work correctly.
  15. mhsuffolk

    Stripe v3 module for SCA

    @asro2004 Thank you again for all the work you have done on this. I have updated to 1.0.3 and now I have the issue as described in your instructions "If the payment is processed, and the checkout success page is displayed, but the order is not complete" The icon under the arrow says there is 1 pending webhook. I have retried it and nothing happens apart from a second line in the dashboard stating error 400. The order is in Preparing state with no order history and no emails. Apart from the email missing field bug that I reported before every thing worked correctly before these changes. In the webhook.php file you have added several of these, require_once(DIR_FS_CATALOG . 'includes/modules/payment/stripe_sca.php'); which has DIR_FS_CATALOG added which was not there before. I am NOT a coder but is that correct?
  16. mhsuffolk

    Stripe v3 module for SCA

    Some more small bugs, sorry! 1. Webhook Signing Secret needs a live and test field. It took me a while to find the need for a separate test version originally. 2. In the confirmation email, the Payment Method field is not filled, see images
  17. mhsuffolk

    Stripe v3 module for SCA

    Thank you for your reply. It is @Mikepo that has that problem, mine is fine now including the sort order.
  18. mhsuffolk

    Stripe v3 module for SCA

    Sorry @Mikepo you have exhausted my ideas and knowledge. Hopefully @asro2004 can help. Bear in mind he is in New Zealand so is probably fast asleep now.
  19. mhsuffolk

    Stripe v3 module for SCA

    I am out today and will look into this later. All my other payment modules (PayPal and Bank Transfer) behave correctly regarding their sort position including the original Stripe module, which is still installed but switched off
  20. mhsuffolk

    Stripe v3 module for SCA

    No, mine goes on to the success page OK.
  21. mhsuffolk

    Stripe v3 module for SCA

    No, if you install the Stripe CLI available here Stripe CLI then you should be able to run all your tests on your local server. All the details are on the page under my link.
  22. mhsuffolk

    Stripe v3 module for SCA

    I have successfully run test transactions on my live site. One thing that was not in the instructions is that you have to create a webhook in test mode on the Stripe site as well as in live mode. Perhaps that is the problem. I presume you are running this locally, if so you need to install this to overcome the fact that stripe cannot see your site files.
  23. mhsuffolk

    Stripe v3 module for SCA

    I think it is to do with your secret key, have you put both the publishable key and secret key into the module. Are they both either live keys or test keys
  24. mhsuffolk

    Stripe v3 module for SCA

    Brilliant work so far. Have been testing it, two more small bugs 1. In ext/modules/payment/stripe_sca/webhook.php Line 199 EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $order_id, 'SSL', false) . "\n" . file name needs hardcoding. 2.Module sort order appears not to work, always appears as the last item, I want it first!
  25. mhsuffolk

    Stripe v3 module for SCA

    Phoenix 1.0.2.2 PHP 7.3 Xampp In includes/module/payments/stripe_sca.php I get lots of these Warning: Use of undefined constant TABLE_ORDERS - assumed 'TABLE_ORDERS' (this will throw an Error in a future version of PHP) in D:\Phoenix_7_3\htdocs\includes\modules\payment\stripe_sca.php on line 135 1146 - Table 'phoenix.table_orders' doesn't exist I presume it is that the file is using the old method of specifying tables from a database_tables.php. I think they all need to be hard coded e.g Line 135 tep_db_query('delete from orders where orders_id = "' . (int) $order_id . '"'); Instead of tep_db_query('delete from ' . TABLE_ORDERS . ' where orders_id = "' . (int) $order_id . '"');
×