https://www.2checkout.com/documentation/checkout/inline-checkout
543264
public function index() {
		$data['button_confirm'] = $this->language->get('button_confirm');

		$this->load->model('checkout/order');

		$order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']);

		$data['action'] = 'https://www.2checkout.com/checkout/purchase';

		$data['sid'] = $this->config->get('payment_twocheckout_account');
		//$data['currency_code'] = $order_info['currency_code'];
		$data['currency_code'] = 'USD';
		//$data['total'] = $this->currency->format($order_info['total'], $order_info['currency_code'], $order_info['currency_value'], false);
		$data['total'] = $this->currency->format($order_info['total'], 'USD', $this->currency->getValue('USD'), false);
		$data['merchant_order_id'] = $this->session->data['order_id'];
		$data['card_holder_name'] = $order_info['payment_firstname'] . ' ' . $order_info['payment_lastname'];
		$data['street_address'] = $order_info['payment_address_1'];
		$data['city'] = $order_info['payment_city'];

		if ($order_info['payment_iso_code_2'] == 'US' || $order_info['payment_iso_code_2'] == 'CA') {
			$data['state'] = $order_info['payment_zone'];
		} else {
			$data['state'] = 'XX';
		}

		$data['zip'] = $order_info['payment_postcode'];
		$data['country'] = $order_info['payment_country'];
		$data['email'] = $order_info['email'];
		$data['phone'] = $order_info['telephone'];

		$data['shipping'] = (int)$this->cart->hasShipping();

		if ($data['shipping']) {
			$data['ship_street_address'] = $order_info['shipping_address_1'];
			$data['ship_city'] = $order_info['shipping_city'];
			$data['ship_state'] = $order_info['shipping_zone'];
			$data['ship_zip'] = $order_info['shipping_postcode'];
			$data['ship_country'] = $order_info['shipping_country'];
		} else {
			$data['ship_street_address'] = $order_info['payment_address_1'];
			$data['ship_city'] = $order_info['payment_city'];
			$data['ship_state'] = $order_info['payment_zone'];
			$data['ship_zip'] = $order_info['payment_postcode'];
			$data['ship_country'] = $order_info['payment_country'];
		}

		$data['products'] = array();

		$products = $this->cart->getProducts();

		foreach ($products as $product) {
			$data['products'][] = array(
				'product_id'  => $product['product_id'],
				'name'        => $product['name'],
				'description' => $product['name'],
				'quantity'    => $product['quantity'],
				'price'       => $this->currency->format($product['price'], $order_info['currency_code'], $order_info['currency_value'], false),
				'shipping'    => !empty($product['shipping']) ? 'Y' : 'N'
			);
		}

		if ($this->config->get('payment_twocheckout_test')) {
			$data['demo'] = 'Y';
		} else {
			$data['demo'] = '';
		}

		if ($this->config->get('payment_twocheckout_display')) {
			$data['display'] = 'Y';
		} else {
			$data['display'] = '';
		}

		$data['lang'] = $this->session->data['language'];

		$data['return_url'] = $this->url->link('extension/payment/twocheckout/callback');

		return $this->load->view('extension/payment/twocheckout', $data);
	}
6425
function checkout (cb) {
    if (my.args.length !== 1) {
      return cb( erf( '"checkout" command requires single <bin> argument' ) )
    }
    var bin
    , found = false
    , chbin = my.args[0]

    for (bin in my.state.bins) {
      if (path.basename(bin) === path.basename(chbin)) {
        my.state.bins = setActiveBin(my.state.bins, bin)
        found = true
      }
    }
    if (!found) {
      return cb( erf( 'Can not checkout ' +  path.basename(chbin)
                      + '. Bin not recognized'))
    }
    cb(null, my.state)
  }
54493
def confirm_checkout(dest: str, commit: str) -> bool:
    
    usable = False
    if os.path.exists(dest):
        try:
            rev = subprocess.check_output(["git", "rev-parse", "--verify", "HEAD"], cwd=dest).decode("utf-8").strip()
            usable = (rev == commit)
        except subprocess.CalledProcessError:
            pass
        if not usable:
            logging.info("Problem with %s, requires new checkout.", dest)
    return usable
890066
def add_item(name, checked = false, position = 'bottom')
      client.post("/checklists/#{id}/checkItems", {name: name, checked: checked, pos: position})
    end
1182520
function (content, block, target, type, attbs, alternateSearchPaths, handler) {
    var linefeed = /\r\n/g.test(content) ? '\r\n' : '\n',
        lines = block.split(linefeed),
        ref = '',
        indent = (lines[0].match(/^\s*/) || [])[0],
        ccmatches = block.match(regcc),
        blockContent = lines.slice(1, -1).join('');

    target = target || 'replace';

    if (type === 'css') {

        // Check to see if there are any css references at all.
        if( blockContent.search(regcss) !== -1 )
        {
            if(attbs) {
              ref = '<link rel="stylesheet" href="' + target + '" ' + attbs + '>';
            } else {
              ref = '<link rel="stylesheet" href="' + target + '">';
            }
        }

    } else if (type === 'js') {

        // Check to see if there are any js references at all.
        if( blockContent.search(regscript) !== -1 )
        {
            if(attbs) {
              ref = '<script src="' + target + '" ' + attbs + '></script>';
            } else {
              ref = '<script src="' + target + '"></script>';
            }
        }

    } else if (type === 'remove') {
        ref = '';
    } else if (handler) {
      ref = handler(blockContent, target, attbs, alternateSearchPaths);
    }
    else {
      ref = null;
    }

    if(ref != null) {
      ref = indent + ref;

      // Reserve IE conditional comment if exist
      if (ccmatches) {
        ref = indent + ccmatches[1] + linefeed + ref + linefeed + indent + ccmatches[2];
      }

      return content.replace(block, ref);
    }
    else { return content; }
  }
532078
def step_three
      redirect_to '/checkout/step-one' and return if !logged_in?
      redirect_to '/checkout/step-two' and return if @order.shipping_address.nil? || @order.billing_address.nil?
      @rates = ShippingCalculator.rates(@order)
      @selected_rate = ShippingCalculator.rate(@order)
    end
412508
def checkout
      response = gateway.purchase(payment.price,
                                  currency: payment.currency.to_s,
                                  client_ip_addr: request.remote_ip,
                                  description: payment.description,
                                  language: payment.first_data_language)
      if response[:transaction_id]
        trx = LolitaFirstData::Transaction.add(payment, request, response)
        redirect_to gateway.redirect_url(trx.transaction_id)
      else
        if request.xhr? || !request.referer
          render text: I18n.t('fd.purchase_failed'), status: 400
        else
          flash[:error] = I18n.t('fd.purchase_failed')
          redirect_to :back
        end
      end
    ensure
      LolitaFirstData.logger.info("[#{session_id}][#{payment.id}][checkout] #{response}")
    end
204182
function extractCheckoutOptions(props) {
  var options = [
    props.paymentMethod,
    props.shippingMethod
  ];

  // Remove all nulls, empty strings, zeroes, and join with commas.
  var valid = select(options, function(e) {return e; });
  return valid.length > 0 ? valid.join(', ') : null;
}
227417
def inline(self) -> str:
        
        return "{0}:{1}:{2}".format(self.amount, self.base,
                                    pypeg2.compose(self.condition, output.Condition))
795917
def collection_check_boxes2(method, collection, value_method, text_method, options = {}, html_options = {})
      html_options ||= {}
      html_options[:multiple] = 'multiple'
      collection_select2 method, collection, value_method, text_method, options, html_options
    end
481191
function checkOutput(input, output) {
  let reg = new RegExp('\\$1');
  if (reg.test(output)) {
    if (Array.isArray(input)) {
      const outputMin = input.map(file => {
        return utils.setFileNameMin(file, output);
      });
      return { output: outputMin };
    } else {
      return { output: utils.setFileNameMin(input, output) };
    }
  }
}
601452
def ship(opts)
      opts = opts.merge(:sale_id => self.sale_id)
      Twocheckout::API.request(:post, 'sales/mark_shipped', opts)
    end
732076
def input_check(self, name, label, multi_line=False):
        
        lines = list()
        lines.append('{%% if %s %%}' % name)
        lines.append(self.tab + '{% set checked = "checked" %}')
        lines.append('{% else %}')
        lines.append(self.tab  + '{% set checked = "" %}')
        lines.append('{% endif %}')
        if multi_line:
            line_break = "<br>"
        else:
            line_break = ""
        lines.append('<input type="checkbox" name="%s" value="%s" {{checked}}> %s %s' % (name, name, label, line_break))        
        return "\n".join(lines)
346424
def checkout(self):
        '''
        
        '''
        tgt_ref = self.get_checkout_target()
        try:
            head_sha = self.repo.rev_parse('HEAD').hexsha
        except Exception:
            # Should only happen the first time we are checking out, since
            # we fetch first before ever checking anything out.
            head_sha = None

        # 'origin/' + tgt_ref ==> matches a branch head
        # 'tags/' + tgt_ref + '@{commit}' ==> matches tag's commit
        for rev_parse_target, checkout_ref in (
                ('origin/' + tgt_ref, 'origin/' + tgt_ref),
                ('tags/' + tgt_ref, 'tags/' + tgt_ref)):
            try:
                target_sha = self.repo.rev_parse(rev_parse_target).hexsha
            except Exception:
                # ref does not exist
                continue
            else:
                if head_sha == target_sha:
                    # No need to checkout, we're already up-to-date
                    return self.check_root()

            try:
                with self.gen_lock(lock_type='checkout'):
                    self.repo.git.checkout(checkout_ref)
                    log.debug(
                        '%s remote \'%s\' has been checked out to %s',
                        self.role,
                        self.id,
                        checkout_ref
                    )
            except GitLockError as exc:
                if exc.errno == errno.EEXIST:
                    # Re-raise with a different strerror containing a
                    # more meaningful error message for the calling
                    # function.
                    raise GitLockError(
                        exc.errno,
                        'Checkout lock exists for {0} remote \'{1}\''
                        .format(self.role, self.id)
                    )
                else:
                    log.error(
                        'Error %d encountered obtaining checkout lock '
                        'for %s remote \'%s\'',
                        exc.errno,
                        self.role,
                        self.id
                    )
                    return None
            except Exception:
                continue
            return self.check_root()
        log.error(
            'Failed to checkout %s from %s remote \'%s\': remote ref does '
            'not exist', tgt_ref, self.role, self.id
        )
        return None
788345
function (token) {
            var inline = false;
            if (token) {
                if (token.type === 'LineComment') {
                    inline = true;
                } else if (token.type === 'BlockComment') {
                    inline = (token.value.indexOf('\n') === -1);
                }
            }
            return inline;
        }
836018
def checkout
      @order = Effective::Order.find(params[:id])

      authorize_effective_order!

      @page_title ||= 'Checkout'

      if request.get?
        @order.assign_confirmed_if_valid!
        render :checkout and return
      end

      Effective::Order.transaction do
        begin
          @order.assign_attributes(checkout_params)
          @order.confirm!
          redirect_to(effective_orders.checkout_admin_order_path(@order)) and return
        rescue => e
          raise ActiveRecord::Rollback
        end
      end

      flash.now[:danger] = "Unable to proceed: #{flash_errors(@order)}. Please try again."
      render :checkout
    end
1055921
def inline_css(self, html):
        
        premailer = Premailer(html)
        inlined_html = premailer.transform(pretty_print=True)
        return inlined_html