Token given by Transbank for payment initialization url.

        Will raise PaymentError when an error ocurred.
540019
def token(self):
        
        if not self._token:
            self._token = self.fetch_token()
            logger.payment(self)
        return self._token
153413
def dynamic_start(self, access_token, instance_url=None, **kw):
        
        self.dynamic = {'access_token': str(access_token), 'instance_url': str(instance_url)}
        self.dynamic.update(kw)
208391
def payments
      reset_errors!
      
      response = Http.get("/invoices/#{uuid}/payments/", domain.token)
      
      return [] if response.code != 200
      
      MultiJson.decode(response.body)
    end
479078
def url_for_token(self, token):
        """"""
        book_url = self.get_config_value("pages", token)
        book, _, url_tail = book_url.partition(':')
        book_base = settings.HELP_TOKENS_BOOKS[book]

        url = book_base

        lang = getattr(settings, "HELP_TOKENS_LANGUAGE_CODE", None)
        if lang is not None:
            lang = self.get_config_value("locales", lang)
            url += "/" + lang

        version = getattr(settings, "HELP_TOKENS_VERSION", None)
        if version is not None:
            url += "/" + version

        url += "/" + url_tail
        return url
1352511
def DomainTokensCreate(self, domain_id, amount):
        
        if self.__SenseApiCall__('/domains/{0}/tokens.json'.format(domain_id), 'POST', parameters = {"amount":amount}):
            return True
        else:
            self.__error__ = "api call unsuccessful"
            return False
1337267
def _handle_get(self, transaction):
        
        path = str("/" + transaction.request.uri_path)
        transaction.response = Response()
        transaction.response.destination = transaction.request.source
        transaction.response.token = transaction.request.token
        if path == defines.DISCOVERY_URL:
            transaction = self._server.resourceLayer.discover(transaction)
        else:
            try:
                resource = self._server.root[path]
            except KeyError:
                resource = None
            if resource is None or path == '/':
                # Not Found
                transaction.response.code = defines.Codes.NOT_FOUND.number
            else:
                transaction.resource = resource
                transaction = self._server.resourceLayer.get_resource(transaction)
        return transaction
1044273
def __place_order(self, token):
        
        order_id = 0
        response = None

        if not token or token['value'] == '':
            raise LendingClubError('The token parameter is False, None or unknown.')

        # Process order confirmation page
        try:
            # Place the order
            payload = {}
            if token:
                payload['struts.token.name'] = token['name']
                payload[token['name']] = token['value']
            response = self.lc.session.post('/portfolio/orderConfirmed.action', data=payload)

            # Process HTML for the order ID
            html = response.text
            soup = BeautifulSoup(html, 'html5lib')

            # Order num
            order_field = soup.find(id='order_id')
            if order_field:
                order_id = int(order_field['value'])

            # Did not find an ID
            if order_id == 0:
                self.__log('An investment order was submitted, but a confirmation ID could not be determined')
                raise LendingClubError('No order ID was found when placing the order.', response)
            else:
                return order_id

        except Exception as e:
            raise LendingClubError('Could not place the order: {0}'.format(str(e)), response)
216598
def express_endpoint_for_token(token, commit=False):
    
    pp_params = dict(token=token)
    if commit:
        pp_params['useraction'] = 'commit'
    return express_endpoint() % urlencode(pp_params)
29242
def fetch_token(self, **kwargs):
        
        if 'client_secret' not in kwargs:
            kwargs.update(client_secret=self.client_secret)
        return self.session.fetch_token(token_url, **kwargs)
736824
def expect_token(token, tok_type, tok_str=None):
  
  if not match_token(token, tok_type, tok_str):
    raise ValueError("Expected token %s, got %s on line %s col %s" % (
      token_repr(tok_type, tok_str), str(token),
      token.start[0], token.start[1] + 1))
113181
def url(self):
        

        if self._url is False:
            self._url = None
            name = self['distribution_point']
            if name.name != 'full_name':
                raise ValueError(unwrap(
                    '''
                    CRL distribution points that are relative to the issuer are
                    not supported
                    '''
                ))

            for general_name in name.chosen:
                if general_name.name == 'uniform_resource_identifier':
                    url = general_name.native
                    if url.lower().startswith(('http://', 'https://', 'ldap://', 'ldaps://')):
                        self._url = url
                        break

        return self._url
246025
def request(self, account, amount):
        
        return self._keeper.dispenser.request_tokens(amount, account)
365456
def get_initial_token
      @request_token = get_request_token
      puts "Place \"#{@request_token.authorize_url}\" in your browser"
      print "Enter the number they give you: "
      pin = STDIN.readline.chomp
      @access_token = @request_token.get_access_token(:oauth_verifier => pin)
    end
246204
def t_ID(self, token):
        '
        if token.value in self.KEYWORDS:
            token.type = self.KEYWORDS[token.value]
            return token
        else:
            return token
722296
def get_authenticity_token(self, url=_SIGNIN_URL):
        
        res = self.client._get(url=url, expected_status_code=200)
        soup = BeautifulSoup(res.text, _DEFAULT_BEAUTIFULSOUP_PARSER)
        selection = soup.select(_AUTHENTICITY_TOKEN_SELECTOR)
        try:
            authenticity_token = selection[0].get("content")
        except:
            raise ValueError(
                "authenticity_token not found in {} with {}\n{}".format(
                 _SIGNIN_URL, _AUTHENTICITY_TOKEN_SELECTOR, res.text))
        return authenticity_token
1354154
def create_order_with_token(request):
    
    # Get the request data
    try:
        address = request.data['address']
        shipping_option = request.data.get('shipping_option', None)
        email = request.data['email']
        transaction_id = request.data['transaction_id']
    except KeyError:
        return Response(data={"message": "Missing parameters from request data"},
                        status=status.HTTP_400_BAD_REQUEST)

    # Create the order
    order = create_order(
        email,
        request,
        addresses=address,
        shipping_option=shipping_option,
    )

    order.payment_date = timezone.now()
    order.transaction_id = transaction_id
    order.save()
    # Once the order has been successfully taken, we can empty the basket
    destroy_basket(request)

    return Response(data={"order_id": order.id}, status=status.HTTP_201_CREATED)
427189
def subdispatch_to_all_initiatortransfer(
        payment_state: InitiatorPaymentState,
        state_change: StateChange,
        channelidentifiers_to_channels: ChannelMap,
        pseudo_random_generator: random.Random,
) -> TransitionResult[InitiatorPaymentState]:
    events = list()
    ''' 
    '''
    for secrethash in list(payment_state.initiator_transfers.keys()):
        initiator_state = payment_state.initiator_transfers[secrethash]
        sub_iteration = subdispatch_to_initiatortransfer(
            payment_state=payment_state,
            initiator_state=initiator_state,
            state_change=state_change,
            channelidentifiers_to_channels=channelidentifiers_to_channels,
            pseudo_random_generator=pseudo_random_generator,
        )
        events.extend(sub_iteration.events)
    return TransitionResult(payment_state, events)