-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add null type hints #34
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #34 +/- ##
=========================================
Coverage 99.84% 99.85%
- Complexity 427 428 +1
=========================================
Files 110 110
Lines 1321 1348 +27
=========================================
+ Hits 1319 1346 +27
Misses 2 2
... and 19 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Hello @BlackbitDevs, thank you very much for this PR. From what I can see in your Session object, the Are you able to fix the build by removing the tests about the payment status ? |
Hello @Prometee
Not sure. Can you suggest how to better do this? |
Hi @BlackbitDevs ! It's kind of weird the format you have in response, can you check your Stripe dashboard to see if you are using an old API version ? https://dashboard.stripe.com/developers (bottom of the page "API version". Also can you check you are using the lastest version of this Payum lib ? About the tests, one file is responsible to the change you made : https://github.com/FLUX-SE/PayumStripe/blob/master/tests/Action/StatusSessionActionTest.php. |
Hi @Prometee payum/payum - versions : * 1.7.3 |
After some digging, this behaviour is not possible unless Stripe has an issue with your account or something is altering the Stripe API response in your code. Here is the Stripe Open API specifications for this field (those specs generate the components:
schemas:
checkout.session:
properties:
payment_status:
description: >-
The payment status of the Checkout Session, one of `paid`, `unpaid`,
or `no_payment_required`.
You can use this value to decide when to fulfill your customer's
order.
enum:
- no_payment_required
- paid
- unpaid
type: string
required:
- payment_status I git blame those line to see when the field has been introduced and it was done by this commit : stripe/openapi@dd28064 (Sep 2, 2020) So clearly according to those specifications, the |
After paying on Stripe and going back to the website, I had the following error:
This PR seemed to fix the issue but after applying the changes, it caused other problems. I don't think the changes in this PR are revelant as updating the plugin to the version 2.0.11 fixed my issue. |
According to the latest API Stripe version now "payment_status" present not for all requests. When you try get data about payment
POST /v1/payment_pages/cs_test_a1mwvpJk6c4mLg......
API will return data without "payment_status"