lib/rents/transaction.rb in rents-0.1.8 vs lib/rents/transaction.rb in rents-0.1.9
- old
+ new
@@ -15,10 +15,15 @@
# Return it RID easily
def rid
self.resp[:rid]
end
+ # Return it Purchase URL, to pay on the OperatorPage
+ def purchase_url
+ self.resp[:purchase_url]
+ end
+
# GET /api/transactions/:rid by it attr
def verify
auth_hash = {}
auth_hash[:auth] = self.request_params[:auth]
if self.rid.nil? then return {error:'RID not received'} else self.path = "transactions/#{self.rid}/#{auth_hash.it_keys_to_get_param}" end
@@ -27,10 +32,10 @@
# POST /api/transactions/page return operator page URL, like the Cielo Page
def charge_page full_resp=false
custom_http_params
# SetUp redirect dynamic if is test
- self.request_params[:transaction][:redirect_link] = "#{self.redirect_link}/test" if self.request_params[:transaction][:test_env]
+ self.request_params[:transaction][:redirect_link] = "#{self.redirect_link}" if self.request_params[:transaction][:test_env]
# dynamic path (it is written when a specific method use it)
self.path = "transactions/page"
# using json_request because need only the answer (do not use something like it HTTP Code)
\ No newline at end of file