original_docstring: Payment Step 2: Record the generated payment token and require authorization using the token.
docstring: Payment Step 2: Record the generated payment token and require authorization using the token.
docstring_tokens: Payment Step 2 : Record the generated payment token and require authorization using the token .
code: def record_created_payment_token(self, reply_log_entry, data):
          """Payment Step 2: Record the generated payment token and require authorization using the token."""
          token_string = data.get("payment_token")
          card_num = data.get("req_card_number")
          card_type = data.get("req_card_type")
          try:
              token = PaymentToken.objects.filter(token=token_string).get()
          except PaymentToken.DoesNotExist:
              token = PaymentToken(
                  log=reply_log_entry,
                  token=token_string,
                  masked_card_number=card_num,
                  card_type=card_type,
              )
              token.save()
          return token, None
code_tokens: def record_created_payment_token ( self , reply_log_entry , data ) : token_string = data . get ( "payment_token" ) card_num = data . get ( "req_card_number" ) card_type = data . get ( "req_card_type" ) try : token = PaymentToken . objects . filter ( token = token_string ) . get ( ) except PaymentToken . DoesNotExist : token = PaymentToken ( log = reply_log_entry , token = token_string , masked_card_number = card_num , card_type = card_type , ) token . save ( ) return token , None
short_docstring: Payment Step 2: Record the generated payment token and require authorization using the token.
short_docstring_tokens: Payment Step 2 : Record the generated payment token and require authorization using the token .
comment: """Payment Step 2: Record the generated payment token and require authorization using the token."""