catarse_pagarme 2.3.1 → 2.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/assets/javascripts/catarse_pagarme/payment_slip.js +2 -1
- data/app/controllers/catarse_pagarme/notifications_controller.rb +7 -1
- data/app/views/catarse_pagarme/pagarme/review.html.slim +78 -82
- data/lib/catarse_pagarme/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9cf785e1efe35f1c224b10a7bb6f7d7f8221bb7d
|
4
|
+
data.tar.gz: b39b4b236ca26f8373aa186c51fd5558c5250f2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 053c9cc93e8ddb92b39df38632028d2e099d3d3f16fe73daeedb594c977a71b1408a72cee2b304d3f10d8b60bcf99d4038c0b1774ba442a897bed2ff9c9c4a40
|
7
|
+
data.tar.gz: af65a6d4d0899b85ba08ccdbec8724d5ca7c906a8e3912b5a67bad68108f5de6bb622eb37fedabc268e939c565536aac74e8697ed5e3577204191cef9f095ea2
|
data/Gemfile.lock
CHANGED
@@ -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">
|
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
|
-
|
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
|
-
.
|
19
|
-
#
|
20
|
-
|
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-
|
40
|
-
.fontsize-small.fontweight-semibold.
|
41
|
-
=
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
=
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
|
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
|
-
.
|
77
|
-
|
78
|
-
|
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-
|
81
|
-
|
82
|
-
|
83
|
-
|
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
|
+
|
|
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
|
-
|
86
|
-
|
87
|
-
|
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
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
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'
|
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.
|
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-
|
12
|
+
date: 2014-11-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|