Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

implementing comission

  • Loading branch information...
commit 3a5bff57999e2f3d66b129197b8873c234dc3147 1 parent fa18328
@ramorim authored
Showing with 20 additions and 0 deletions.
  1. +20 −0 lib/moip/direct_payment.rb
View
20 lib/moip/direct_payment.rb
@@ -148,6 +148,26 @@ def body(attributes = {})
xml.TelefoneFixo { xml.text attributes[:pagador][:tel_fixo] }
}
}
+
+ unless attributes[:comissoes].nil?
+ xml.Comissoes {
+ attributes[:comissoes].each do |comissao|
+ xml.Comissionamento {
+ xml.Razao { xml.text comissao[:razao] }
+ xml.Comissionado {
+ xml.LoginMoip { xml.text comissao[:login_moip]}
+ }
+ xml.ValorFixo { xml.text comissao[:valor_fixo]}
+ }
+ end
+ }
+ end
+
+ unless attributes[:recebedor].nil?
+ xml.Recebedor {
+ xml.Email { xml.text attributes[:recebedor][:email]}
+ }
+ end
# Boleto Bancario
if attributes[:forma] == "BoletoBancario"
Please sign in to comment.
Something went wrong with that request. Please try again.