catarse_pagarme 2.3.1 → 2.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 83a061f286afa0a36ae73425f478a7f4d0ccdb31
4
- data.tar.gz: 9dfb1f2fd1f10ccbb982eb9ac345a04b29bdff03
3
+ metadata.gz: 9cf785e1efe35f1c224b10a7bb6f7d7f8221bb7d
4
+ data.tar.gz: b39b4b236ca26f8373aa186c51fd5558c5250f2b
5
5
  SHA512:
6
- metadata.gz: 4f5d67550f8bdfc619a403c2974652c690af28b0da94dd631f694cdc77b33fa96681f0cca1d1e55d992f7d692005ce4e67311fd4433ad72e3413de6bf61e9914
7
- data.tar.gz: 241870fde667387059968734e57f9b59394c4facf856af2a77c16796755bb28191bc95b4747879f6c5f04b6ac11d91ab9b1495128e0e71b6ed683c8b76cd5ef4
6
+ metadata.gz: 053c9cc93e8ddb92b39df38632028d2e099d3d3f16fe73daeedb594c977a71b1408a72cee2b304d3f10d8b60bcf99d4038c0b1774ba442a897bed2ff9c9c4a40
7
+ data.tar.gz: af65a6d4d0899b85ba08ccdbec8724d5ca7c906a8e3912b5a67bad68108f5de6bb622eb37fedabc268e939c565536aac74e8697ed5e3577204191cef9f095ea2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- catarse_pagarme (2.1.1)
4
+ catarse_pagarme (2.3.2)
5
5
  pagarme (~> 1.9.5)
6
6
  rails (~> 4.0)
7
7
 
@@ -53,9 +53,10 @@ App.views.PagarmeForm.addChild('PaymentSlip', {
53
53
 
54
54
  $(e.currentTarget).show();
55
55
  } else if(response.boleto_url) {
56
- var link = $('<a class="alt-link" target="__blank">'+response.boleto_url+'</a>')
56
+ var link = $('<a class="alt-link" target="__blank">Clique aqui para ver o boleto e completar o pagamento.</a>')
57
57
  link.attr('href', response.boleto_url);
58
58
  that.$('.link_content').empty().html(link);
59
+ that.$('> div:not(.after-success)').hide();
59
60
  that.$('#payment-slip-link').slideDown('slow');
60
61
  }
61
62
  });
@@ -8,7 +8,13 @@ module CatarsePagarme
8
8
  contribution.payment_notifications.create(extra_data: params.to_json)
9
9
 
10
10
  if PagarMe::validate_fingerprint(contribution.try(:payment_id), params[:fingerprint])
11
- delegator.change_status_by_transaction(params[:current_status])
11
+
12
+ if params[:current_status] == 'paid' && params[:desired_status] == 'refunded'
13
+ contribution.try(:invalid_refund)
14
+ else
15
+ delegator.change_status_by_transaction(params[:current_status])
16
+ end
17
+
12
18
  return render nothing: true, status: 200
13
19
  end
14
20
  end
@@ -15,76 +15,76 @@
15
15
  = label_tag :payment_type_slip, class: "boleto w-form-label" do
16
16
  = image_tag 'catarse_bootstrap/payment_boleto.png'
17
17
 
18
- .formwrapper
19
- #payment_type_credit_card_section.payment_section
20
- div[class="my-credit-cards w-form back-payment-form-creditcard formwrapper records-choice #{(current_user.credit_cards.present? ? '' : 'w-hidden')}"]
21
- - current_user.credit_cards.each_with_index do |credit_card, i|
22
- .w-row.creditcard-records
23
- .w-col.w-col-1
24
- .w-radio.w-clearfix.back-payment-credit-card-radio-field
25
- = radio_button_tag :payment_subscription_card, credit_card.subscription_id, i == 0, {"data-stored" => true}
26
- .w-col.w-col-2
27
- .fontsize-small.fontweight-semibold.text-success
28
- = credit_card.card_brand.upcase
29
- .w-col.w-col-5
30
- .fontsize-small.fontweight-semibold.u-marginbottom-20
31
- = "XXXX.XXXX.XXXX.#{credit_card.last_digits}"
32
- .w-col.w-col-4
33
- - if @contribution.value.to_f >= CatarsePagarme.configuration.minimum_value_for_installment.to_f
34
- = select_tag :payment_card_installments, options_for_select(installments_for_select(@contribution)), class: 'w-select text-field text-field-creditcard'
18
+ #payment_type_credit_card_section.payment_section
19
+ div[class="my-credit-cards w-form back-payment-form-creditcard records-choice #{(current_user.credit_cards.present? ? '' : 'w-hidden')}"]
20
+ - current_user.credit_cards.each_with_index do |credit_card, i|
35
21
  .w-row.creditcard-records
36
22
  .w-col.w-col-1
37
23
  .w-radio.w-clearfix.back-payment-credit-card-radio-field
38
- = radio_button_tag :payment_subscription_card, 0
39
- .w-col.w-col-11
40
- .fontsize-small.fontweight-semibold.fontcolor-secondary
41
- = t('projects.contributions.edit.form_labels.user_another_card')
42
- div[class="w-form formwrapper type_card_data #{(current_user.credit_cards.present? ? 'w-hidden' : '')}"]
43
- .w-row
44
- .w-col.w-col-12
45
- .field-label.fontweight-semibold
46
- = label_tag :payment_card_name, t('projects.contributions.edit.form_labels.payment_card_name'), class: 'field-label fontweight-semibold'
47
- = text_field_tag :payment_card_name, nil, class: 'w-input text-field'
48
- .w-row
49
- .w-col.w-col-6.w-sub-col
50
- = label_tag :payment_card_number, t('projects.contributions.edit.form_labels.payment_card_number'), class: 'fontweight-semibold field-label'
51
- .w-row
52
- .w-col.w-col-9.w-col-small-9.w-col-tiny-9
53
- = text_field_tag :payment_card_number, nil, class: 'w-input text-field prefix'
54
- .w-col.w-col-3.w-col-small-3.w-col-tiny-3.text-field.postfix.no-hover
55
- #payment_card_flag.fontsize-smallest.fontcolor-secondary.u-text-center
56
- |&nbsp;
57
- .w-col.w-col-6
58
- .w-row
59
- .w-col.w-col-6.w-col-small-6.w-col-tiny-6.w-sub-col-middle
60
- = label_tag :payment_card_source, t('projects.contributions.edit.form_labels.payment_card_source'), class: 'field-label fontweight-semibold w-hidden-medium'
61
- = label_tag :payment_card_source, t('projects.contributions.edit.form_labels.payment_card_source_short'), class: 'field-label fontweight-semibold w-hidden-main w-hidden-small w-hidden-tiny'
62
- = text_field_tag :payment_card_source, nil, class: 'w-input text-field'
63
- .w-col.w-col-6.w-col-small-6.w-col-tiny-6
64
- = label_tag :payment_card_date, t('projects.contributions.edit.form_labels.payment_card_date'), class: 'field-label fontweight-semibold'
65
- = text_field_tag :payment_card_date, nil, class: 'w-input text-field'
66
- - if @contribution.value.to_f >= CatarsePagarme.configuration.minimum_value_for_installment.to_f
67
- .w-row
68
- .w-col.w-col-6.w-sub-col
69
- = label_tag :payment_card_installments, t('projects.contributions.edit.form_labels.payment_card_installments'), class: 'field-label fontweight-semibold'
70
- = select_tag :payment_card_installments, options_for_select(installments_for_select(@contribution)), class: 'w-select text-field'
71
- .w-checkbox.w-clearfix
72
- = check_box_tag :payment_save_card, 1, false, class: 'w-checkbox-input'
73
- = label_tag :payment_save_card, t('projects.contributions.edit.payment_save_card'), class: 'w-form-label'
24
+ = radio_button_tag :payment_subscription_card, credit_card.subscription_id, i == 0, {"data-stored" => true}
25
+ .w-col.w-col-2
26
+ .fontsize-small.fontweight-semibold.text-success
27
+ = credit_card.card_brand.upcase
28
+ .w-col.w-col-5
29
+ .fontsize-small.fontweight-semibold.u-marginbottom-20
30
+ = "XXXX.XXXX.XXXX.#{credit_card.last_digits}"
31
+ .w-col.w-col-4
32
+ - if @contribution.value.to_f >= CatarsePagarme.configuration.minimum_value_for_installment.to_f
33
+ = select_tag :payment_card_installments, options_for_select(installments_for_select(@contribution)), class: 'w-select text-field text-field-creditcard'
34
+ .w-row.creditcard-records
35
+ .w-col.w-col-1
36
+ .w-radio.w-clearfix.back-payment-credit-card-radio-field
37
+ = radio_button_tag :payment_subscription_card, 0
38
+ .w-col.w-col-11
39
+ .fontsize-small.fontweight-semibold.fontcolor-secondary
40
+ = t('projects.contributions.edit.form_labels.user_another_card')
41
+ div[class="w-form formwrapper type_card_data #{(current_user.credit_cards.present? ? 'w-hidden' : '')}"]
74
42
  .w-row
75
43
  .w-col.w-col-12
76
- .payment-error-message.card.card-error.u-radius.zindex-10.u-marginbottom-30.w-hidden
77
- .fontsize-smaller.fontweight-bold.u-marginbottom-10= t('projects.contributions.edit.review_errors_title')
78
- .message-text.fontsize-smaller = t('.review_errors')
44
+ .field-label.fontweight-semibold
45
+ = label_tag :payment_card_name, t('projects.contributions.edit.form_labels.payment_card_name'), class: 'field-label fontweight-semibold'
46
+ = text_field_tag :payment_card_name, nil, class: 'w-input text-field'
79
47
  .w-row
80
- .w-col.w-col-push-3.w-col-6
81
- #card-loading.loader.u-text-center.w-col.w-col-12.u-marginbottom-30 = image_tag "catarse_bootstrap/loader.gif"
82
- = submit_tag t('projects.contributions.review.form.labels.submit'), :class => 'btn btn-large u-marginbottom-20', :id => "credit_card_submit"
83
- = render partial: 'terms'
48
+ .w-col.w-col-6.w-sub-col
49
+ = label_tag :payment_card_number, t('projects.contributions.edit.form_labels.payment_card_number'), class: 'fontweight-semibold field-label'
50
+ .w-row
51
+ .w-col.w-col-9.w-col-small-9.w-col-tiny-9
52
+ = text_field_tag :payment_card_number, nil, class: 'w-input text-field prefix'
53
+ .w-col.w-col-3.w-col-small-3.w-col-tiny-3.text-field.postfix.no-hover
54
+ #payment_card_flag.fontsize-smallest.fontcolor-secondary.u-text-center
55
+ |&nbsp;
56
+ .w-col.w-col-6
57
+ .w-row
58
+ .w-col.w-col-6.w-col-small-6.w-col-tiny-6.w-sub-col-middle
59
+ = label_tag :payment_card_source, t('projects.contributions.edit.form_labels.payment_card_source'), class: 'field-label fontweight-semibold w-hidden-medium'
60
+ = label_tag :payment_card_source, t('projects.contributions.edit.form_labels.payment_card_source_short'), class: 'field-label fontweight-semibold w-hidden-main w-hidden-small w-hidden-tiny'
61
+ = text_field_tag :payment_card_source, nil, class: 'w-input text-field'
62
+ .w-col.w-col-6.w-col-small-6.w-col-tiny-6
63
+ = label_tag :payment_card_date, t('projects.contributions.edit.form_labels.payment_card_date'), class: 'field-label fontweight-semibold'
64
+ = number_field_tag :payment_card_date, nil, class: 'w-input text-field'
65
+ - if @contribution.value.to_f >= CatarsePagarme.configuration.minimum_value_for_installment.to_f
66
+ .w-row
67
+ .w-col.w-col-6.w-sub-col
68
+ = label_tag :payment_card_installments, t('projects.contributions.edit.form_labels.payment_card_installments'), class: 'field-label fontweight-semibold'
69
+ = select_tag :payment_card_installments, options_for_select(installments_for_select(@contribution)), class: 'w-select text-field'
70
+ .w-checkbox.w-clearfix
71
+ = check_box_tag :payment_save_card, 1, false, class: 'w-checkbox-input'
72
+ = label_tag :payment_save_card, t('projects.contributions.edit.payment_save_card'), class: 'w-form-label'
73
+ .w-row
74
+ .w-col.w-col-12
75
+ .payment-error-message.card.card-error.u-radius.zindex-10.u-marginbottom-30.w-hidden
76
+ .fontsize-smaller.fontweight-bold.u-marginbottom-10= t('projects.contributions.edit.review_errors_title')
77
+ .message-text.fontsize-smaller = t('.review_errors')
78
+ .w-row
79
+ .w-col.w-col-push-3.w-col-6
80
+ #card-loading.loader.u-text-center.w-col.w-col-12.u-marginbottom-30 = image_tag "catarse_bootstrap/loader.gif"
81
+ = submit_tag t('projects.contributions.review.form.labels.submit'), :class => 'btn btn-large u-marginbottom-20', :id => "credit_card_submit"
82
+ = render partial: 'terms'
84
83
 
85
- #payment_type_slip_section.payment_section.w-hidden
86
- .card.card-message.u-radius.zindex-10.fontsize-small.u-marginbottom-30
87
- = t('projects.contributions.edit.payment_slip_disclaimer')
84
+ #payment_type_slip_section.payment_section.w-hidden
85
+ .card.card-message.u-radius.zindex-10.fontsize-small.u-marginbottom-30
86
+ = t('projects.contributions.edit.payment_slip_disclaimer')
87
+ .formwrapper
88
88
  = simple_form_for current_user, url: 'javascript:void(0)' do |f|
89
89
  .bank_accounts
90
90
  = f.simple_fields_for :bank_account do |bank_form|
@@ -98,22 +98,18 @@
98
98
  .w-row
99
99
  = bank_form.input :owner_name, as: :string, input_html: { value: bank_form.object.owner_name || current_user.full_name }, wrapper_html: {class: 'w-col w-sub-col w-col-6'}
100
100
  = bank_form.input :owner_document, as: :string, input_html: { value: bank_form.object.owner_document || current_user.cpf }, wrapper_html: {class: 'w-col w-col-6'}
101
- .w-row
102
- .w-col.w-col-12
103
- #payment-slip-instructions.card.card-message.u-radius.fontsize-small.zindex-10.u-marginbottom-30
104
- | Após clicar no botão abaixo, você receberá um link com o boleto para completar o pagamento.
105
- .w-row
106
- .w-col.w-col-12
107
- .payment-error-message.card.card-error.u-radius.zindex-10.u-marginbottom-30.w-hidden
108
- .fontsize-smaller.fontweight-bold.u-marginbottom-10= t('projects.contributions.edit.review_errors_title')
109
- .message-text.fontsize-smaller = t('.review_errors')
110
- .w-row
111
- .w-col.w-col-12
112
- #payment-slip-link.card.card-message.fontsize-small.u-radius.u-marginbottom-30.zindex-10.w-hidden
113
- .link_content.fontsize-smaller
114
- .fontsize-smaller Você também receberá um email com esse boleto.
115
- .w-row
116
- .w-col.w-col-push-3.w-col-6
117
- #card-loading.loader.u-text-center.w-col.w-col-12.u-marginbottom-30 = image_tag "catarse_bootstrap/loader.gif"
118
- = submit_tag t('projects.contributions.review.form.labels.build_boleto'), :class => 'btn btn-large u-marginbottom-20', :id => "build_boleto"
119
- = render partial: 'terms'
101
+ .w-row
102
+ .w-col.w-col-12
103
+ .payment-error-message.card.card-error.u-radius.zindex-10.u-marginbottom-30.w-hidden
104
+ .fontsize-smaller.fontweight-bold.u-marginbottom-10= t('projects.contributions.edit.review_errors_title')
105
+ .message-text.fontsize-smaller = t('.review_errors')
106
+ .w-row.after-success
107
+ .w-col.w-col-12
108
+ #payment-slip-link.card.card-message.fontsize-small.u-radius.u-marginbottom-30.zindex-10.w-hidden
109
+ .link_content.fontsize-small
110
+ .fontsize-small Você também receberá um email com esse boleto.
111
+ .w-row
112
+ .w-col.w-col-push-3.w-col-6
113
+ #card-loading.loader.u-text-center.w-col.w-col-12.u-marginbottom-30 = image_tag "catarse_bootstrap/loader.gif"
114
+ = submit_tag t('projects.contributions.review.form.labels.build_boleto'), :class => 'btn btn-large u-marginbottom-20', :id => "build_boleto"
115
+ = render partial: 'terms'
@@ -1,3 +1,3 @@
1
1
  module CatarsePagarme
2
- VERSION = "2.3.1"
2
+ VERSION = "2.3.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: catarse_pagarme
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antônio Roberto Silva
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-10-27 00:00:00.000000000 Z
12
+ date: 2014-11-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails