Skip to content

Commit

Permalink
Update Secure Pay AU to meet spec document for MessageInfo element
Browse files Browse the repository at this point in the history
git-svn-id: https://activemerchant.googlecode.com/svn/trunk/active_merchant@635 6513ea26-6c20-0410-8a68-89cd7235086d
  • Loading branch information
codyfauser committed Feb 7, 2008
1 parent 67c2365 commit 966c962
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
@@ -1,5 +1,6 @@
= ActiveMerchant CHANGELOG

* Update Secure Pay Au to meet specs for MessageInfo elements [cody]
* Add support for the Australian Secure Pay payment gateway [cody]
* Allow LinkPoint cancellations for recurring billing. [yanagimoto.shin]
* Add support for Åland Islands to the country list [cody]
Expand Down
12 changes: 9 additions & 3 deletions lib/active_merchant/billing/gateways/secure_pay_au.rb
Expand Up @@ -69,8 +69,8 @@ def build_request(action, body)
xml.instruct!
xml.tag! 'SecurePayMessage' do
xml.tag! 'MessageInfo' do
xml.tag! 'messageID', Utils.generate_unique_id
xml.tag! 'messageTimestamp', ''
xml.tag! 'messageID', Utils.generate_unique_id.slice(0, 30)
xml.tag! 'messageTimestamp', generate_timestamp
xml.tag! 'timeoutValue', request_timeout
xml.tag! 'apiVersion', API_VERSION
end
Expand Down Expand Up @@ -138,7 +138,13 @@ def parse_element(response, node)
else
response[node.name.underscore.to_sym] = node.text
end
end
end

# YYYYDDMMHHNNSSKKK000sOOO
def generate_timestamp
time = Time.now.utc
time.strftime("%Y%d%m%H%M%S#{time.usec}+000")
end
end
end
end
Expand Down

0 comments on commit 966c962

Please sign in to comment.