original_docstring: Payment Step 1: Require form POST to Cybersource
docstring: Payment Step 1: Require form POST to Cybersource
docstring_tokens: Payment Step 1 : Require form POST to Cybersource
code: def _record_payment(self, request, order, method_key, amount, reference, **kwargs):
          """Payment Step 1: Require form POST to Cybersource"""
          # Allow application to include extra, arbitrary fields in the request to CS
          extra_fields = {}
          signals.pre_build_get_token_request.send(
              sender=self.__class__,
              extra_fields=extra_fields,
              request=request,
              order=order,
              method_key=method_key,
          )
  
          # Build the data for CyberSource transaction
          session_id = request.COOKIES.get(django_settings.SESSION_COOKIE_NAME)
          operation = actions.CreatePaymentToken(
              session_id=session_id,
              order=order,
              method_key=method_key,
              amount=amount,
              server_hostname=request.META.get("HTTP_HOST", ""),
              customer_ip_address=request.META["REMOTE_ADDR"],
              fingerprint_session_id=request.session.get(CHECKOUT_FINGERPRINT_SESSION_ID),
              extra_fields=extra_fields,
          )
  
          # Return form fields to the browser. The browser then needs to fill in the blank
          # fields (like billing data) and submit them as a POST to CyberSource.
          url, fields = self._fields(operation)
  
          # Return a response showing we need to post some fields to the given
          # URL to finishing processing this payment method
          return FormPostRequired(amount=amount, name="get-token", url=url, fields=fields)
code_tokens: def _record_payment ( self , request , order , method_key , amount , reference , ** kwargs ) : extra_fields = { } signals . pre_build_get_token_request . send ( sender = self . __class__ , extra_fields = extra_fields , request = request , order = order , method_key = method_key , ) session_id = request . COOKIES . get ( django_settings . SESSION_COOKIE_NAME ) operation = actions . CreatePaymentToken ( session_id = session_id , order = order , method_key = method_key , amount = amount , server_hostname = request . META . get ( "HTTP_HOST" , "" ) , customer_ip_address = request . META [ "REMOTE_ADDR" ] , fingerprint_session_id = request . session . get ( CHECKOUT_FINGERPRINT_SESSION_ID ) , extra_fields = extra_fields , ) url , fields = self . _fields ( operation ) return FormPostRequired ( amount = amount , name = "get-token" , url = url , fields = fields )
short_docstring: Payment Step 1: Require form POST to Cybersource
short_docstring_tokens: Payment Step 1 : Require form POST to Cybersource
comment: """Payment Step 1: Require form POST to Cybersource"""$SEP$# Allow application to include extra, arbitrary fields in the request to CS$SEP$# Build the data for CyberSource transaction$SEP$# Return form fields to the browser. The browser then needs to fill in the blank$SEP$# fields (like billing data) and submit them as a POST to CyberSource.$SEP$# Return a response showing we need to post some fields to the given$SEP$# URL to finishing processing this payment method