vaulted_billing-termcap 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -40,6 +40,7 @@ VaultedBilling::Gateways::Ipcommerce.class_eval do
40
40
  end
41
41
 
42
42
  def return_unlinked(customer, credit_card, amount, options = {})
43
+ credit_card = credit_card.to_vaulted_billing
43
44
  data = {
44
45
  :"__type" => "ReturnTransaction:http://schemas.ipcommerce.com/CWS/v2.0/Transactions/Rest",
45
46
  :ApplicationProfileId => @application_id,
@@ -50,18 +51,18 @@ VaultedBilling::Gateways::Ipcommerce.class_eval do
50
51
  :Amount => "%.2f" % amount,
51
52
  :CurrencyCode => 4,
52
53
  :TransactionDateTime => Time.now.xmlschema,
53
- :CustomerPresent => 0,
54
+ :CustomerPresent => options[:customer_present] || 0, # Not Set
54
55
  :EmployeeId => options[:employee_id],
55
- :EntryMode => 1,
56
- :GoodsType => 0,
57
- :IndustryType => 2,
56
+ :EntryMode => options[:entry_mode] || 1, # Keyed
57
+ :GoodsType => options[:goods_type] || 0, # Not Set
58
+ :IndustryType => options[:industry_type] || 2, # Ecommerce
58
59
  :OrderNumber => options[:order_id] || generate_order_number,
59
- :SignatureCaptured => false
60
+ :SignatureCaptured => options[:signature_captured] || false
60
61
  },
61
62
  :TenderData => card_data(credit_card)
62
63
  }
63
64
  }
64
-
65
+
65
66
  response = http("Txn", options[:workflow_id] || @service_id).post(data)
66
67
  transaction = new_transaction_from_response(response)
67
68
  respond_with(transaction,
@@ -2,16 +2,16 @@ module VaultedBilling
2
2
  module Transactions
3
3
  class Ipcommerce < VaultedBilling::Transaction
4
4
  CaptureStates = %w(
5
- !! NotSet CannotCapture ReadyForCapture CapturePending Captured
6
- CaptureDeclined InProcess CapturedUndoPermitted CapturePendingUndoPermitted CaptureError
7
- CaptureUnknown BatchSent BatchSentUndoPermitted
5
+ !! NotSet CannotCapture ReadyForCapture CapturePending
6
+ Captured CaptureDeclined InProcess CapturedUndoPermitted CapturePendingUndoPermitted
7
+ CaptureError CaptureUnknown BatchSent BatchSentUndoPermitted
8
8
  ).freeze
9
9
 
10
10
  TransactionStates = %w(
11
- !! NotSet Declined Verified Authorized Adjusted
12
- Captured CaptureDeclined PartiallyCaptured Undone ReturnRequested
13
- PartialReturnRequested ReturnUndone Returned PartiallyReturned InProcess
14
- ErrorValidation ErrorUnknown ErrorConnecting
11
+ !! NotSet Declined Verified Authorized
12
+ Adjusted Captured CaptureDeclined PartiallyCaptured Undone
13
+ ReturnRequested PartialReturnRequested ReturnUndone Returned PartiallyReturned
14
+ InProcess ErrorValidation ErrorUnknown ErrorConnecting
15
15
  ).freeze
16
16
 
17
17
  attr_accessor :raw_result
@@ -1,5 +1,5 @@
1
1
  module VaultedBilling
2
2
  module Termcap
3
- Version = '0.0.4'
3
+ Version = '0.0.5'
4
4
  end
5
5
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: vaulted_billing-termcap
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.4
5
+ version: 0.0.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Adam Fortuna
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-08-31 00:00:00 -04:00
13
+ date: 2011-09-12 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency