Reputation:
The woocommerce credit card form is added like this : https://docs.woocommerce.com/wc-apidocs/source-class-WC_Payment_Gateway_CC.html#50-98
public function payment_fields() {
$cc_form = new WC_Payment_Gateway_CC();
$cc_form->id = $this->id;
$cc_form->supports = $this->supports;
$cc_form->form();
}
but i have to pass the credit card details to API in order to get a response
public function process_payment( $order_id ) {
global $woocommerce;
$customer_order = new WC_Order( $order_id );
$order_data = $customer_order->get_data();
$creditcardnumber = ??;
}
How can get the credit card number and other details so that i can post it?
Upvotes: 1
Views: 2307