Closed MiselAdemi closed 3 years ago
Hi @MiselAdemi,
Thanks for having opened this issue.
We managed to reproduce this behaviour, and are going to publish a new version of this package to address the issue.
In the meantime, a workaround is to edit to_oauth_param_string
and add the following code on line 144 (just before oauth_params = ''
):
consolidated_params = consolidated_params.sort_by {|k, v| k}.to_h
Thanks!
Hi @MiselAdemi, you should be able to use this new version: https://rubygems.org/gems/mastercard_oauth1_signer/versions/1.1.2
When I try using to make a request to:
GET https://sandbox.api.mastercard.com/merchant-id/v2/merchant-ids?merchant_id=DOLIUMPTYLTDWELSHPOOLWA&type=ExactMatch
I get the following error message:When I try to make a request using Postman I get the correct response
200 OK
.I notice that if I check
Add empty parameters to signature
in Postman I will also get401
error.I am wondering how I can overcome this problem? I was assuming that I should pass something to
payload
argument ofOAuth.get_authorization_header
but not sure what?