Compare commits
2 Commits
b55142d9b8
...
c7a5f2a8e0
Author | SHA1 | Date | |
---|---|---|---|
c7a5f2a8e0 | |||
4eb6d2de05 |
@ -18,7 +18,8 @@ module IfThenPay
|
||||
end
|
||||
|
||||
def self.payments(date)
|
||||
URI("https://ifthenpay.com/ifmbws/ifmbws.asmx/getPaymentsJson?chavebackoffice=#{ENV['IFTHENPAY_BO_KEY']}&entidade=&subentidade=&dtHrInicio=#{date}&dtHrFim=#{date}&referencia=&valor=&sandbox=0")
|
||||
end_date = (Time.parse(date) + 1).strftime("%Y-%m-%d %H:%M:%S")
|
||||
URI("https://ifthenpay.com/ifmbws/ifmbws.asmx/getPaymentsJson?chavebackoffice=#{ENV['IFTHENPAY_BO_KEY']}&entidade=&subentidade=&dtHrInicio=#{date}&dtHrFim=#{end_date}&referencia=&valor=&sandbox=0")
|
||||
.then{|u| Net::HTTP.get(u)}
|
||||
.then{|b| Nokogiri::XML(b).child.child.text}
|
||||
.then{|x| JSON.parse(x)}
|
||||
|
@ -39,7 +39,13 @@
|
||||
<tr>
|
||||
<td><%= notification.to_be_sent_on %></td>
|
||||
<td><code><%= notification.template %></code></td>
|
||||
<td><%= link_to notification.member do %><%= notification.member.display_name %> <<%= notification.member.email %>><% end %></td>
|
||||
<td>
|
||||
<% if notification.member %>
|
||||
<%= link_to notification.member do %><%= notification.member.display_name %> <<%= notification.member.email %>><% end %>
|
||||
<% else %>
|
||||
---
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<% if notification.status == 'scheduled' %>
|
||||
<%= form_with url: deliver_notification_path(notification) do |form| %>
|
||||
|
Loading…
Reference in New Issue
Block a user