def charge_setup(self, card, billing_info):
        """
        standard setup, used for charges
        """
        billing_info = self.translate(billing_info)

        # use the card + extra data- send it to samurai for storage and tokenization
        card._exp_yr_style = True
        super(Samurai, self).use_credit_card(card)
        pm = PaymentMethod.create(
                    card.number,
                    card.verification_value,
                    card.exp_month, card.exp_year, **billing_info)

        debug_string = " paython.gateways.samurai_ff.charge_setup() -- response on setting pm"
        logger.debug(debug_string.center(80, '='))
        logger.debug(dir(pm))

        if pm.errors:
            raise DataValidationError('Invalid Card Data: %s' % pm.errors[pm.error_messages[0]['context']][0])

        return pm.payment_method_token
dataset/ETHPy150Open abunsen/Paython/paython/gateways/samurai_ff.py/Samurai.charge_setup/original