lib/pagseguro/authorizations.rb in pagseguro_next-1.0.2 vs lib/pagseguro/authorizations.rb in pagseguro_next-1.0.3
- old
+ new
@@ -14,16 +14,16 @@
direct_pre_approval: "USE_DIRECT_PRE_APPROVAL",
manage_pre_approvals: "MANAGE_PAYMENT_PRE_APPROVALS"
}
def create(params)
- xml = build_request(params).to_xml
- response = post_xml("/v2/authorizations/request", xml)
+ body = build_request(params).to_xml
+ response = post("/v2/authorizations/request", body, xml: :simple)
response.authorization_request
end
def find_by_notification_code(code)
- response = get_xml("/v2/authorizations/notifications/#{code}")
+ response = get("/v2/authorizations/notifications/#{code}", nil, xml: :simple)
response.authorization
end
def url(code)
url_for :site, "/v2/authorization/request.jhtml", code: code