Created
June 4, 2010 03:19
-
-
Save nbibler/424888 to your computer and use it in GitHub Desktop.
Simplepay submit tag customization example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /config/environment.rb | |
RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION | |
require File.join(File.dirname(__FILE__), 'boot') | |
Rails::Initializer.run do |config| | |
config.gem 'simplepay', :lib => 'simplepay/rails' | |
config.time_zone = 'UTC' | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated HTML | |
<form action="https://authorize.payments-sandbox.amazon.com/pba/paypipeline" method="post"> | |
<input name="accessKey" type="hidden" value="MYAMAZONACCESSKEYID" /> | |
<input name="signature" type="hidden" value="NPOHMvXk2O8Q6dSOP2YOpNeAls4=" /> | |
<input name="amazonPaymentsAccountId" type="hidden" value="ACCOUNTIDFORAMAZONPAYMENTS" /> | |
<input name="description" type="hidden" value="Profit!" /> | |
<input name="amount" type="hidden" value="USD 10.95" /> | |
<input name="cobrandingStyle" type="hidden" value="logo" /> | |
<input name="isDonationWidget" type="hidden" value="0" /> | |
<input type="image" src="/images/rails.png" value="Submit"/> <!-- THE OPTIONAL SUBMIT CONTENT PASSED IN THE ERB WAS DROPPED IN HERE WITHOUT MODIFICATION --> | |
</form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Random ERB view | |
<%= simplepay_form_for(:standard, { | |
:amount => 10.95, | |
:description => "Profit!" | |
}, "<input type=\"image\" src=\"/images/rails.png\" value=\"Submit\"/>") %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /config/initializers/simplepay.rb | |
Simplepay.aws_access_key_id = 'MYAMAZONACCESSKEYID' | |
Simplepay.aws_secret_access_key = 'MYAMAZONSECRETACCESSKEY' | |
Simplepay.account_id = 'ACCOUNTIDFORAMAZONPAYMENTS' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment