Public Gists by tekin

Gravatar
Wed Nov 11 06:08:26 -0800 2009
1
2
3
AF:
  code: AF
  name: Afghanistan
Gravatar
Wed Jul 01 03:22:24 -0700 2009
1
2
3
def create
  @credit_card = ActiveMerchant::Billing::CreditCard.new(params[:credit_card])
  @billing_address = Address.new(params[:address])
Gravatar
Tue Jun 30 11:50:11 -0700 2009
1
2
3
<% form_tag new_order_payment_path(@order), :id => 'reload_frame', :target => '_top', :method => 'get' do %>
  <%= hidden_field_tag :verification_failed, true %>
  <noscript>
Gravatar
Tue Jun 30 11:49:45 -0700 2009
1
2
3
<% form_tag complete_order_path(@order), :id => 'reload_frame', :target => '_top', :method => 'get' do %>
  <noscript>
    <p>Verification complete, click the button below to continue.</p>
Gravatar
Tue Jun 30 11:49:04 -0700 2009
1
2
3
<% form_tag(params[:acs_url], :id => '3dform') do %>
  <%= hidden_field_tag :PaReq, params[:pa_req] %>
  <%= hidden_field_tag :MD, params[:md] %>
Gravatar
Tue Jun 30 11:48:14 -0700 2009
1
2
3
<h2>Card Verification and Authorisation</h2>
<p>A message explaining what is happening and what is required of the user.</p>
<iframe src="<%= three_d_form_order_payment_path(@order, :acs_url => @payment.acs_url, :md => @payment.md, :pa_req => @payment.pa_req) %>" name="3diframe" width="350" height="500" frameborder="0">
Gravatar
Tue Jun 30 11:47:43 -0700 2009
1
2
3
def create
  @credit_card = ActiveMerchant::Billing::CreditCard.new(params[:credit_card])
  @billing_address = Address.new(params[:address])
Gravatar
Tue Jun 30 11:47:11 -0700 2009
1
2
3
response = gateway.three_d_complete(pa_res, md)
if response.success?
  puts "Authentication complete and purchase successfully made"
Gravatar
Tue Jun 30 11:46:46 -0700 2009
1
2
3
response = gateway.purchase(100, credit_card)
if response.success?
  puts "Purchase successfully made"
Gravatar
Tue Jun 30 11:46:18 -0700 2009
1
2
3
response = gateway.purchase(100, credit_card)
if response.success?
  puts "Purchase successfully made"
Gravatar
Tue Jun 30 11:45:56 -0700 2009
1
2
3
gateway = ActiveMerchant::Billing::ProtxGateway.new({
  :login => 'test',
  :password => 'password',
Gravatar
Sat Jun 13 03:52:48 -0700 2009
1
2
3
git fetch origin other_branch:other_branch
 * [new branch] other_branch -> other_branch
git branch
Gravatar
Wed Mar 18 16:08:35 -0700 2009
1
2
3
<%= options_from_collection_for_select(
  @products,
  :id,
Gravatar
Wed Mar 18 16:07:18 -0700 2009
1
2
3
<%= options_for_select(
  ['Choose a size', 'small', 'medium', 'large'],
  nil, # selected value
Gravatar
Wed Mar 18 15:41:53 -0700 2009
1
2
3
<%= options_from_collection_for_select(@product.sizes, :name, :id, :disabled => lambda{|size| size.out_of_stock?}) %>
 
<!-- If small and medium returned true for the method out_of_stock?, you’d get something like: -->
Gravatar
Wed Mar 18 15:18:06 -0700 2009
1
2
3
<%= select(:post, :category, Post::CATEGORIES, :disabled => 'private') %>
 
<!— Give's you something like —>