Open kedvardas1 opened 2 years ago
@kedvardas1 If you want to process a payment through a WooCommerce's payment gateway don't set isPaid
.
isPaid: true
tells WooGraphQL to skip the payment processing step and that this order was paid for outside of WooCommerce.
@kidunot89 yes I know. we are using isPaid: true only when payment is succesful from React Stripe elements.
the problem I wrote about is with isPaid: false
@kedvardas1 passing false to isPaid
has no purpose. If you aren't setting it to true
leave it out.
@kedvardas1 are you passing the stripe intent as metaData?
@kidunot89 okay, thanks.
yes, as metaData. stripe intent id and customer id
ADDED: seems check_source / prepared_source is failing every second time
Help needed! We are using two Checkout mutations. One is for successful order with isPaid: true. Second one with isPaid: false if stripe payment intent fails (we are using 3DS here in Europe). And the problem is with isPaid: false.
Steps to reproduce the behavior:
Expected behavior I am sure it should not show "Payment processing failed." error. We should see thank you page if payment intent successful or error from stripe react elements if payment intent fails.
Here is the mutation if payment fails from first time
mutation Checkout( $metaData: [MetaDataInput] $billing: CustomerAddressInput ) { checkout( input: { paymentMethod: "stripe" metaData: $metaData billing: $billing isPaid: false } ) { order { cartHash databaseId needsPayment } } }
Here is the mutation for success payment
mutation Checkout( $metaData: [MetaDataInput] $billing: CustomerAddressInput $transactionId: String! ) { checkout( input: { paymentMethod: "stripe" metaData: $metaData billing: $billing isPaid: true transactionId: $transactionId } ) { order { cartHash databaseId needsPayment } } }
Plugin Versions**
Any suggestions, documentation or problems already solved somewhere?