Problem with tokenization developing a custom gateway
-
Hello everyone and thanks so much in advance for your support,
I am trying to extend a custom payment gateway using tokenization for woocommerce but I am having a problem that may be too obvious but i’ve spent all afternoon trying to figure out with no luck.
So, I have developed a custom payment gateway fully funtional extending the WC_Payment_Gateway_CC with:
$this->supports = array( 'default_credit_card_form');
To retrive the credit card information withing the class I use:
$_POST['{payment method id}-card-number']; $_POST['{payment method id}-card-expiry']; $_POST['{payment method id}-card-cvc'];
I now want to extend it to use ‘tokenization’ so the first(and only) thing I did was changing the “supports” line to:
$this->supports = array( 'default_credit_card_form', 'tokenization' );
After I did that suddently the credit card information is no longer in the $_POST variable. The $_POST variable I get now is.
$[POST]:{"payment_method":"{payment method id}","wc-{payment method id}-payment-token":"new","woocommerce_pay":"1","_wpnonce":"d1d883779d","_wp_http_referer":"\/checkout\/order-pay\/77\/?pay_for_order=true&key=wc_order_5ae638306f334"}
Does anyone how how do I get the credit card information from the form when ‘tokenization’ is supported?
Thanks againg for your help. I’ve spent a few hours reading through documentation and forums and have no idea what else to try.
- The topic ‘Problem with tokenization developing a custom gateway’ is closed to new replies.