-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
using: ipizza 2.0.1
hey,
the scenario: using authentication service of lhv
when creating a request for service 4011 all is well
> Ipizza::Provider::Lhv.new.authentication_request
#<Ipizza::AuthenticationRequest:0x00561258b4c538
@extra_params={"VK_ENCODING"=>"UTF-8", "VK_LANG"=>nil},
@service_url="https://www.lhv.ee/banklink",
@sign_params=
{"VK_SERVICE"=>4011,
"VK_VERSION"=>"008",
"VK_SND_ID"=>"SOME OÜ",
"VK_RETURN"=>"https://www.example.com/endpoint",
"VK_DATETIME"=>"2016-12-14T16:24:01+0200",
"VK_RID"=>nil,
"VK_REPLY"=>"3012",
"VK_MAC"=>
"XyrU7R9m2jK5q/Q9iiJ9ZJrhEhHExgwqgY+SPvjt10/1oRAcZWi5Jz1...."}>
however, when forcing service 4012 with additional params, the resulting sign_params is missing the crucial VK_REC_ID (bank's id, which i also tried to add to the configuration yaml to no avail), and the VK_NONCE. For some reason only VK_RID got merged from that hash.
> Ipizza::Provider::Lhv.new.authentication_request( 4012, { vk_nonce: '1' , vk_rid: '1'})
#<Ipizza::AuthenticationRequest:0x00561258b03540
@extra_params={"VK_ENCODING"=>"UTF-8", "VK_LANG"=>nil},
@service_url="https://www.lhv.ee/banklink",
@sign_params=
{"VK_SERVICE"=>4012,
"VK_VERSION"=>"008",
"VK_SND_ID"=>"SOME OÜ",
"VK_RETURN"=>"https://www.example.com/endpoint",
"VK_DATETIME"=>"2016-12-14T16:27:12+0200",
"VK_RID"=>"1",
"VK_MAC"=>
"VI3AyDMkEjgIfGQqgZmjK6h4Z8eyA3wxrLhnp1jt9e5xU6u..."}>
it's pretty weird, as the case statement in provider/base.rb seems pretty straight forward.
am i missing anything?
Add:
initializer in my rails app under config/initializers/banklink.rb:
Ipizza::Config.load_from_file Rails.root.join('config', 'banklink.yml')
config yml: like the example from readme, only addition:
rec_id: LHV
but that did nothing
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels