lib/request_retval.rb in webmoney-0.0.8 vs lib/request_retval.rb in webmoney-0.0.9
- old
+ new
@@ -19,6 +19,17 @@
def retval_find_wm(doc)
# do nothing
# retval = { 1 - found; 0 - not found }
end
-end
\ No newline at end of file
+ def retval_create_invoice(doc)
+ @error = doc.at('//retval').inner_html.to_i
+ @errormsg = doc.at('//retdesc').inner_html
+ raise Webmoney::ResultError, [@error, @errormsg].join(' ') unless @error == 0
+ end
+
+ def retval_outgoing_invoices(doc)
+ @error = doc.at('//retval').inner_html.to_i
+ @errormsg = doc.at('//retdesc').inner_html
+ raise Webmoney::ResultError, [@error, @errormsg].join(' ') unless @error == 0
+ end
+end