Remit Rail Example

19 views
Skip to first unread message

Mason Fischer

unread,
Feb 25, 2011, 3:02:04 PM2/25/11
to Remit
Hello,
I am working on an example rails app for remit (https://
github.com/masonforest/remit_rails_example). I have gotten through the
CBUI pipeline successfully but I am struggling with payment request.

Here is a dump of my payment request response.

"#<Remit::Pay::Response:0x20f2628
@response_metadata=#<Remit::ResponseMetadata:0x20d48e4
@parser=#<Relax::Parsers::Hpricot:0x20d4880
@parameters={:request_id=>{}, :signature_version=>{}, :signature_method=>{}},
@parent=#<Remit::ResponseMetadata:0x20d48e4 ...>,
@xml=#<Hpricot::Doc>>, @raw=nil>, @errors=[#<Remit::Error:0x20c5c54
@code=\"InvalidParams\", @message=\"Invalid Amount\",
@parser=#<Relax::Parsers::Hpricot:0x20c5c2c
@parameters={:code=>{:element=>\"Code\"}, :message=>{:element=>
\"Message\"}}, @parent=#<Remit::Error:0x20c5c54 ...>,
@xml=#<Hpricot::Doc {elem <Error> {elem <Code> \"InvalidParams\" </
Code>} {elem <Message> \"Invalid Amount\" </Message>} </Error>}>>,
@raw=<Error> ... </>>], @parser=#<Relax::Parsers::REXML:0x20f2448
@parameters={:pay_result=>{:type=>Remit::TransactionResponse, :element=>
\"PayResult
\"}, :response_metadata=>{:type=>Remit::ResponseMetadata, :required=>true, :element=>
\"ResponseMetadata\"}}, @parent=#<Remit::Pay::Response:0x20f2628 ...>,
@xml=<UNDEFINED> ... </>>, @pay_result=#<Remit::TransactionResponse:
0x20d7ecc @parser=#<Relax::Parsers::Hpricot:0x20d7e68
@parameters={:transaction_id=>{:element=>\"TransactionId
\"}, :transaction_status=>{:element=>\"TransactionStatus\"}},
@parent=#<Remit::TransactionResponse:0x20d7ecc ...>,
@xml=#<Hpricot::Doc>>, @raw=nil>, @raw=\"<?xml version=\\\"1.0\\\"?>\
\n<Response><Errors><Error><Code>InvalidParams</Code><Message>Invalid
Amount</Message></Error></Errors><RequestID>2dd37428-
f1c0-4e9c-8e20-9bdbc89c564b</RequestID></Response>\">"

All of the remit code is located here

https://github.com/masonforest/remit_rails_example/blob/master/app/controllers/payments_controller.rb

Please fork the project on github! I want to make the example as clean
and as RESTful as possible. I plan to add IPN as well and maybe throw
it up on heroku so people can play around with it.


Any help is greatly appreciated!

Thanks,
-M
Reply all
Reply to author
Forward
0 new messages