• Looks like there is problem generating intent id

    add_action(‘woocommerce_checkout_order_processed’, ‘cynder_paymongo_create_intent’);

    Credit card payment is not working.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Renz Ramos

    (@imrenzramos)

    I fixed the issues, I’m enable now to checkout using CC.

    Issues:
    – PHP 8.2 is not supported, downgraded to 7.4
    wc-paymongo-payment-gateway/classes/cynder-paymongo-gateway.php, under process payment function, after $order = wc_get_order($orderId), I re-call the intent creation at line 309 cynder_paymongo_create_intent($order);
    -for cynder_paymongo_create_intent, the description adjusted to “.” as per error log, it’s need to lower than 100. 2023-06-18T11:43:15+08:00 ERROR [Create Payment Intent] [{“code”:”parameter_above_maximum”,”detail”:”The value for description cannot be more than 1000 characters.”,”source”:{“pointer”:””,”attribute”:”description”}}]

    Thank you,
    Renz

    Thread Starter Renz Ramos

    (@imrenzramos)

    Final fix

    process_payment function for cc

    // Fixed cynder-paymongo-gateway.php process payment // Check Payment Intent ID $paymentIntentId = get_post_meta($orderId,'paymongo_payment_intent_id',true); if (!get_post_meta($orderId,'paymongo_payment_intent_id')){ // Logs wc_get_logger()->log('error', 'Renz Missing Intent ID'); wc_get_logger()->log('info', 'Creating Intent ID'); // Set Payment Method update_post_meta($orderId,'_payment_method','paymongo'); update_post_meta($orderId,'_payment_method_title','Credit Card'); update_post_meta($orderId,'_payment_method_note','FixedRnzdev'); // Generate Payment Intent cynder_paymongo_create_intent($orderId); // Refetch Payment Intent ID $paymentIntentId = get_post_meta($orderId,'paymongo_payment_intent_id',true); wc_get_logger()->log('info', 'Intent ID Created: ' . $paymentIntentId); } // $paymentIntentId = $order->get_meta('paymongo_payment_intent_id');
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Issue on credit card payment’ is closed to new replies.