1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
<?php
defined( 'ABSPATH' ) || exit();
if ( ! class_exists( 'WC_Payment_Token_Stripe_CC' ) ) {
return;
}
class WC_Payment_Token_Stripe_GooglePay extends WC_Payment_Token_Stripe_CC {
protected $type = 'Stripe_GooglePay';
public function get_formats() {
return array(
'gpay_name' => array(
'label' => __( 'Gateway Name', 'woo-stripe-payment' ),
'example' => 'Visa 1111 (Google Pay)',
'format' => '{brand} {last4} (Google Pay)'
)
) + parent::get_formats();
}
public function get_basic_payment_method_title() {
return __( 'Google Pay', 'woo-stripe-payment' );
}
}