#kwac-plugin-error
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- kwac.-account-support, 1 day ago, 4 messages
`
public function process_payment( $order_id ) {
$order = wc_get_order( $order_id );
$status = 'wc-' === substr( $this->order_status, 0, 3 ) ? substr( $this->order_status, 3 ) : $this->order_status;
$payment_intent = \Stripe\PaymentIntent::create(array(
'amount' => $order->get_total() * 100,
'currency' => strtolower( get_woocommerce_currency() ),
'payment_method' => $order->get_payment_method(),
'confirmation_method' => 'manual',
'confirm' => true,
));
// Set order status
$order->update_status( $status, __( 'Checkout with custom payment. ', $this->domain ) );
// or call the Payment complete
// $order->payment_complete();
// Remove cart
WC()->cart->empty_cart();
// Return thankyou redirect
return array(
'result' => 'success',
'redirect' => $this->get_return_url( $order )
);
}
`
Hello! Can you share a request ID that's giving you the error?
request id? im sorry i dont understand as im new in this
where can i find this request id?
You should be able to find it at https://dashboard.stripe.com/logs
req_G7PlJedtVr72Ww
So it looks like your code is directly passing us custom for a Payment Method, when we're really expecting an ID like pm_123.
You need to debug you're code (likely something wrong with the $order) to see what could be going wrong
Okay thank you I won't bother you anymore I will look through it.