Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

MultiUse token support #1

Merged
merged 1 commit into from

2 participants

@donpdonp

Thanks for the Amazon Marketplace gem! I extended it a bit to support MultiUse tokens.

@JEG2 JEG2 merged commit 235584e into okrb:master
@JEG2
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 18, 2012
  1. @donpdonp

    support MultiUse tokens

    donpdonp authored
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/boomerang.rb
View
6 lib/boomerang.rb
@@ -52,6 +52,8 @@ def cbui_form(pipeline, parameters)
%w[callerReference recipientPaysFee]
when "Recurring"
%w[callerReference recurringPeriod transactionAmount]
+ when "MultiUse"
+ %w[callerReference globalAmountLimit recipientTokenList]
end
required_fields.each do |required_field|
unless parameters[required_field]
@@ -59,6 +61,10 @@ def cbui_form(pipeline, parameters)
end
end
+ if pipeline == "MultiUse" && parameters["recipientTokenList"].is_a?(Array)
+ parameters["recipientTokenList"] = parameters["recipientTokenList"].join(',')
+ end
+
url = ENDPOINTS[use_sandbox? ? :cbui_sandbox : :cbui]
signature = Signature.new("GET", url, parameters)
signature.sign(@access_key_id, @secret_access_key)
Something went wrong with that request. Please try again.