Cashier-stripe: hasIncompletePayment always returning false

Created on 11 Aug 2019  路  5Comments  路  Source: laravel/cashier-stripe

  • Cashier Version: v10.0.0-beta.2
  • Laravel Version: 5.8.31
  • PHP Version: 7.1.30

Description:

While testing a payment that requires 3D auth, I've noticed that the hasIncompletePayment() method always returns false when used as $user->hasIncompletePayment(), even tough there's a subscription stripe_status with the value of incomplete.

If I'm calling the hasIncompletePayment() method on a subscription instance, such as $user->subscription('Name')->hasIncompletePayment(), then it returns true.

Shouldn't both return true? There's only 1 subscription in the subscriptions table, and it has the incomplete state as previously mentioned.

needs more info

Most helpful comment

Hey @codefir, glad you got it working.

The docs example does not indicate that this method requires a parameter to work

I've updated this so it's clear that a subscription name can be passed.

All 5 comments

Have you set up webhooks properly?

Yes, webhooks are properly setup, if I complete the payment (trough the confirmation checkout), the subscription gets updated as it should. Also if I go under Stripe's Dashboard > Developers > Webhooks > Webhooks attempts, all of the Webhooks have the status "Succeeded".

Is there anything else I could verify?

I think I know what's wrong. In beta.2 there's no parameter to pass the name of the subscription along. This was added later in https://github.com/laravel/cashier/pull/733 but not yet released. Can you try to pull in dev-master and pass in the name of your subscription?

Indeed that was it. After moving to dev-master branch it started to work. The docs example does not indicate that this method requires a parameter to work, and upon inspecting the method myself, the method was not accepting any parameters, which added to the confusion.

Thank you for your titanic work.

Hey @codefir, glad you got it working.

The docs example does not indicate that this method requires a parameter to work

I've updated this so it's clear that a subscription name can be passed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AnalyzeMe picture AnalyzeMe  路  5Comments

Mr-Anonymous picture Mr-Anonymous  路  5Comments

adrianoGaspar picture adrianoGaspar  路  5Comments

mehrancodes picture mehrancodes  路  5Comments

alexbowers picture alexbowers  路  6Comments