simple-commerce icon indicating copy to clipboard operation
simple-commerce copied to clipboard

"Unpaid" status enforced even after successful payment

Open portseif opened this issue 1 year ago • 3 comments

Description

I'm trying to get the unpaid status to be paid on successful charges.

I'm getting the correct feedback from my webhook, but it isn't reciprocating within Simple Commerce CleanShot 2024-09-22 at 15 29 33 CleanShot 2024-09-22 at 15 39 38

Steps to reproduce

  1. Install Simple Commerce Starter-Kit statamic new mysite duncanmcclean/sc-starter-kit
  2. Create a test key and secret from Stripe Developer and add to .env
  3. Uncomment Stripe gateway from simple-commerce.php
  4. Add anything to cart and checkout with 4242424242424242 and future month/year and any CVV

Environment

Environment Application Name: Statamic Laravel Version: 11.23.5 PHP Version: 8.3.11 Composer Version: 2.7.7 Environment: local Debug Mode: ENABLED URL: sc-start-kit.test Maintenance Mode: OFF Timezone: UTC Locale: en

Cache Config: NOT CACHED Events: NOT CACHED Routes: NOT CACHED Views: CACHED

Drivers Broadcasting: log Cache: file Database: sqlite Logs: stack / single Mail: log Queue: sync Session: file

Simple Commerce Currencies: USD Gateways: Stripe Repository: Customer: DuncanMcClean\SimpleCommerce\Customers\EntryCustomerRepository Repository: Order: DuncanMcClean\SimpleCommerce\Orders\EntryOrderRepository Repository: Product: DuncanMcClean\SimpleCommerce\Products\EntryProductRepository Shipping Methods: Free Shipping Tax Engine: DuncanMcClean\SimpleCommerce\Tax\BasicTaxEngine

Statamic Addons: 1 Sites: 1 Stache Watcher: Enabled (auto) Static Caching: Disabled Version: 5.25.0 PRO

Statamic Addons duncanmcclean/simple-commerce: 7.5.1

portseif avatar Sep 22 '24 19:09 portseif

I'm getting the correct feedback from my webhook, but it isn't reciprocating within Simple Commerce

  • Is the webhook showing any errors in Stripe or are the requests successful?
  • Which URL is the webhook configured for in Stripe?
  • Are there any errors in your log file?
  • Is there an order_id set in the metadata of the payment in Stripe?

duncanmcclean avatar Sep 23 '24 08:09 duncanmcclean

  • Is the webhook showing any errors in Stripe or are the requests successful? No errors in webhook.

  • Which URL is the webhook configured for in Stripe? https://sc-start-kit.test/!/simple-commerce/gateways/stripe/webhook -- I used Stripe CLI to set up a proxy to local.

  • Are there any errors in your log file? No errors in log file.

  • Is there an order_id set in the metadata of the payment in Stripe? There is an order_id being set. Everything works well on Stripe and even takes me to the thank-you page, but nothing is being updated within Simple Commerce.

portseif avatar Sep 23 '24 17:09 portseif

Everything sounds like it should be working. 🤔

Do you see any payment_intent.succeeded events being sent to the webhook in Stripe's logs?

I used Stripe CLI to set up a proxy to local

What's the command you're using to proxy the webhook?

duncanmcclean avatar Sep 23 '24 18:09 duncanmcclean