get_transaction error: ArgumentError (no time information in ""): #10

Closed
roysim opened this Issue Apr 22, 2011 · 7 comments

Comments

Projects
None yet
4 participants
@roysim
Contributor

roysim commented Apr 22, 2011

I get a parsing error when I try to call get_transaction:

Code:
logger.info "Transaction ID = " + transactionID
transaction_status_request = Remit::GetTransactionStatus::Request.new(:transaction_id=>transactionID)
transaction_status = @remit_api.get_transaction(transaction_status_request)

Result:
Transaction ID = 15TULGBA47T43B8F6LUMK9GQ32AHGBK12D5

ArgumentError (no time information in ""):
/opt/local/lib/ruby1.9/1.9.1/time.rb:263:in parse' relax (0.0.7) lib/relax/parsers/hpricot.rb:115:intime_value'
relax (0.0.7) lib/relax/parsers/hpricot.rb:43:in block in parse!' relax (0.0.7) lib/relax/parsers/hpricot.rb:17:ineach'
relax (0.0.7) lib/relax/parsers/hpricot.rb:17:in parse!' relax (0.0.7) lib/relax/parsers/base.rb:10:ininitialize'
relax (0.0.7) lib/relax/parsers/hpricot.rb:12:in initialize' relax (0.0.7) lib/relax/response.rb:17:innew'
relax (0.0.7) lib/relax/response.rb:17:in initialize' relax (0.0.7) lib/relax/parsers/hpricot.rb:39:innew'
relax (0.0.7) lib/relax/parsers/hpricot.rb:39:in block in parse!' relax (0.0.7) lib/relax/parsers/hpricot.rb:17:ineach'
relax (0.0.7) lib/relax/parsers/hpricot.rb:17:in parse!' relax (0.0.7) lib/relax/parsers/base.rb:10:ininitialize'
relax (0.0.7) lib/relax/parsers/hpricot.rb:12:in initialize' relax (0.0.7) lib/relax/response.rb:17:innew'
relax (0.0.7) lib/relax/response.rb:17:in initialize' remit (2.0.1) lib/remit/common.rb:53:ininitialize'
relax (0.0.7) lib/relax/service.rb:74:in new' relax (0.0.7) lib/relax/service.rb:74:incall'
remit (2.0.1) lib/remit/operations/get_transaction.rb:15:in get_transaction' app/controllers/private_lesson_bookings_controller.rb:302:inpayment_response'
internal:prelude:10:in `synchronize'

@roysim

This comment has been minimized.

Show comment Hide comment
@roysim

roysim Apr 22, 2011

Contributor

I should say that I have the same error if I use the following code
logger.info "Transaction ID = " + transactionID transaction_status_request = Remit::GetTransaction::Request.new(:transaction_id=>transactionID) transaction_status = @remit_api.get_transaction(transaction_status_request)

Contributor

roysim commented Apr 22, 2011

I should say that I have the same error if I use the following code
logger.info "Transaction ID = " + transactionID transaction_status_request = Remit::GetTransaction::Request.new(:transaction_id=>transactionID) transaction_status = @remit_api.get_transaction(transaction_status_request)

@roysim

This comment has been minimized.

Show comment Hide comment
@roysim

roysim Apr 23, 2011

Contributor

I fixed this by modifying remit's class Transaction < BaseResponse
to exclude parameter :caller_transaction_date, :type => :time

My code change is at roysim/remit@a62af13

Contributor

roysim commented Apr 23, 2011

I fixed this by modifying remit's class Transaction < BaseResponse
to exclude parameter :caller_transaction_date, :type => :time

My code change is at roysim/remit@a62af13

@roysim roysim closed this Apr 23, 2011

@jjb

This comment has been minimized.

Show comment Hide comment
@jjb

jjb Jul 31, 2011

Contributor

This should be reopened -- the system should be able to handle blank input.

The exception is coming from the relax library, when Time.parse is called on a blank string.

Contributor

jjb commented Jul 31, 2011

This should be reopened -- the system should be able to handle blank input.

The exception is coming from the relax library, when Time.parse is called on a blank string.

@jjb

This comment has been minimized.

Show comment Hide comment
@jjb

jjb Jul 31, 2011

Contributor

I should note: I only started having this problem when I switched from ruby 1.8.7 to 1.9.2 -- I don't yet know why that caused the problem.

Contributor

jjb commented Jul 31, 2011

I should note: I only started having this problem when I switched from ruby 1.8.7 to 1.9.2 -- I don't yet know why that caused the problem.

@roysim roysim reopened this Aug 1, 2011

@pboling

This comment has been minimized.

Show comment Hide comment
@pboling

pboling Aug 9, 2011

Collaborator

We need to create an official fork of Relax for Remit. Remit was written against an older Relax API, and if Remit was rewritten to use the new API it would entail a complete rewrite, and there is not much benefit to Remit in using the new Relax API. Any volunteers to fork/rebrand relax so we can disentangle the project?

This fork has the most recent code that will work with Remit:
https://github.com/dbalatero/relax

Collaborator

pboling commented Aug 9, 2011

We need to create an official fork of Relax for Remit. Remit was written against an older Relax API, and if Remit was rewritten to use the new API it would entail a complete rewrite, and there is not much benefit to Remit in using the new Relax API. Any volunteers to fork/rebrand relax so we can disentangle the project?

This fork has the most recent code that will work with Remit:
https://github.com/dbalatero/relax

@ghost ghost assigned pboling Dec 14, 2011

@rchekaluk

This comment has been minimized.

Show comment Hide comment
@rchekaluk

rchekaluk Dec 18, 2012

I see no change to this behavior when using these gems:

gem 'remit', '2.0.2', :git => 'https://github.com/rchekaluk/remit.git'
gem 'relax', :git => 'https://github.com/dbalatero/relax.git'

Am I missing something?

I see no change to this behavior when using these gems:

gem 'remit', '2.0.2', :git => 'https://github.com/rchekaluk/remit.git'
gem 'relax', :git => 'https://github.com/dbalatero/relax.git'

Am I missing something?

@pboling

This comment has been minimized.

Show comment Hide comment
@pboling

pboling Dec 18, 2012

Collaborator

If you want to use remit you will need to get your hands dirty. No maintainers actively use it on any projects. Additional maintainers are welcome. The released version of relax that works best with remit is 0.7.1, IIRC.

Collaborator

pboling commented Dec 18, 2012

If you want to use remit you will need to get your hands dirty. No maintainers actively use it on any projects. Additional maintainers are welcome. The released version of relax that works best with remit is 0.7.1, IIRC.

@tylerhunt tylerhunt closed this in bc7bf14 Mar 27, 2013

tylerhunt added a commit that referenced this issue Mar 27, 2013

Merge pull request #15 from hube/fix_get_transaction_error
Remove caller_transaction_date (fixes #10).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment