Skip to content
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

Why does the getStripPaymentIntent method report an error? #277

Open
laishengyan opened this issue Feb 20, 2025 · 12 comments
Open

Why does the getStripPaymentIntent method report an error? #277

laishengyan opened this issue Feb 20, 2025 · 12 comments

Comments

@laishengyan
Copy link

Image
Whoever can help me solve this problem, I will be very grateful to him!

@Affinity-Design
Copy link

also getting this

@Affinity-Design
Copy link

Affinity-Design commented Feb 20, 2025

I put on error loging and got this, i wonder if this has to do with the latest Login mutations? @scottyzen

`{
"errors": [
{
"message": "Internal server error",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"stripePaymentIntent"
],
"extensions": {
"debugMessage": "Cannot use object of type WP_Error as array"
}
}
],
"data": {
"stripePaymentIntent": null
},
"extensions": {
"debug": [
{
"type": "DUPLICATE_FIELD",
"message": "You cannot register duplicate fields on the same Type. The field 'logout' already exists on the type 'RootMutation'. Make sure to give the field a unique name.",
"field_name": "logout",
"type_name": "RootMutation",
"existing_field": {
"description": "The Logout mutation",
"eagerlyLoadType": false,
"inputFields": [],
"outputFields": {
"success": {
"type": "Boolean",
"description": "Whether the user was successfully logged out. Will return null if the user is not logged in.",
"resolve": {}
}
},
"mutateAndGetPayload": {},
"name": "logout",
"args": {
"input": {
"type": {},
"description": "Input for the Logout mutation",
"deprecationReason": null,
"name": "input"
}
},
"auth": [],
"isPrivate": false,
"type": {},
"resolve": {}
},
"duplicate_field": {
"inputFields": [],
"outputFields": {
"status": {
"type": "String",
"description": "Logout operation status",
"resolve": {}
}
},
"mutateAndGetPayload": {},
"name": "logout",
"args": {
"input": {
"type": {
"non_null": "logoutInput"
},
"description": "Input for the logout mutation",
"deprecationReason": null
}
},
"auth": [],
"description": "The logout mutation",
"isPrivate": false,
"type": "logoutPayload",
"resolve": {}
},

}

@laishengyan
Copy link
Author

Is it necessary to download the Strip gateway for this question? Because I found the relevant code in the wontext settings yesterday and found that this issue requires downloading the Strip gateway? So can I use PayPal gateway?

@Affinity-Design
Copy link

Affinity-Design commented Feb 21, 2025

You need a stripe gateway on wordpress for sure, Ive been able to work with funnelkits stripe plugin because it works well but the Woo Stripe Plugin Works out of the box, well at least untill i hit this issue... Still havent solved yet

you just have to change the payment method ID on the checkout page to "fkwcs_stripe" instead of "Stripe" if you use the funnel Kit stripe intergration

if ( orderInput.value.paymentMethod.id === "fkwcs_stripe" && stripe && elements.value )
and in the stripe component

<StripeElement ref="stripeElementRef" v-if="stripe" v-show="orderInput.paymentMethod.id == 'fkwcs_stripe'" :stripe="stripe" @updateElement="handleStripeElement" @cardStateChange="handleCardStateChange" />

@laishengyan
Copy link
Author

bu

You need a stripe gateway on wordpress for sure, Ive been able to work with funnelkits stripe plugin because it works well but the Woo Stripe Plugin Works out of the box, well at least untill i hit this issue... Still havent solved yet

you just have to change the payment method ID on the checkout page to "fkwcs_stripe" instead of "Stripe" if you use the funnel Kit stripe intergration

if ( orderInput.value.paymentMethod.id === "fkwcs_stripe" && stripe && elements.value ) and in the stripe component

<StripeElement ref="stripeElementRef" v-if="stripe" v-show="orderInput.paymentMethod.id == 'fkwcs_stripe'" :stripe="stripe" @updateElement="handleStripeElement" @cardStateChange="handleCardStateChange" />

But now I only have a PayPal account and not a Stripe account, so I cannot use a formal account for normal transactions. How can I solve this problem

@Affinity-Design
Copy link

Affinity-Design commented Feb 21, 2025

Honestly I dont think the problem is in the provider but somewhere in the GraphQL calls I keep gettings errors like this

{ "debugMessage": "Expected a value of type \"Int\" but received: 6440", "message": "Internal server error", "extensions": { "category": "internal" }, "locations": [ { "line": 5, "column": 5 } ], "path": [ "stripePaymentIntent", "amount" ] }

your going to want to go to your GQL settings in wordpress and enable Debug to get clues on what is going on

Image

@laishengyan
Copy link
Author

Perhaps there is an issue with the configuration on your end, but so far I have not encountered such a situation

@laishengyan
Copy link
Author

I just want to know if using PayPal for payment will transfer the money to the user's PayPal account or Stripe account

@laishengyan
Copy link
Author

Honestly I dont think the problem is in the provider but somewhere in the GraphQL calls I keep gettings errors like this

{ "debugMessage": "Expected a value of type \"Int\" but received: 6440", "message": "Internal server error", "extensions": { "category": "internal" }, "locations": [ { "line": 5, "column": 5 } ], "path": [ "stripePaymentIntent", "amount" ] }

your going to want to go to your GQL settings in wordpress and enable Debug to get clues on what is going on

Image

Image You can take a look at mine

@Affinity-Design
Copy link

I just want to know if using PayPal for payment will transfer the money to the user's PayPal account or Stripe account

Naturally if paypal is selected, it will go to paypal but you also need that plugin setup in woocommerce

@Affinity-Design
Copy link

Honestly I dont think the problem is in the provider but somewhere in the GraphQL calls I keep gettings errors like this
{ "debugMessage": "Expected a value of type \"Int\" but received: 6440", "message": "Internal server error", "extensions": { "category": "internal" }, "locations": [ { "line": 5, "column": 5 } ], "path": [ "stripePaymentIntent", "amount" ] }
your going to want to go to your GQL settings in wordpress and enable Debug to get clues on what is going on
Image

Image You can take a look at mine

Yes now try to hit the error in development again and you will get more info on whats missing

@alexookah
Copy link
Contributor

You can\t be using WPGraphQL CORS & WP Headless Login at the same time. Because both have logout mutations. Woonuxt Settings plugin is not yet updated to reflect the recent recommended change to start using Headless Login instead of WP GraphQL Cors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants