solidus_paypal_braintree 1.2.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +0 -18
- data/CHANGELOG.md +9 -0
- data/README.md +9 -0
- data/lib/generators/solidus_paypal_braintree/install/install_generator.rb +2 -36
- data/lib/solidus_paypal_braintree/engine.rb +0 -56
- data/lib/solidus_paypal_braintree/version.rb +1 -1
- data/lib/solidus_paypal_braintree.rb +1 -6
- data/solidus_paypal_braintree.gemspec +7 -5
- data/spec/controllers/solidus_paypal_braintree/checkouts_controller_spec.rb +5 -5
- data/spec/controllers/solidus_paypal_braintree/client_tokens_controller_spec.rb +2 -2
- data/spec/controllers/solidus_paypal_braintree/configurations_controller_spec.rb +2 -2
- data/spec/controllers/solidus_paypal_braintree/transactions_controller_spec.rb +5 -5
- data/spec/features/backend/configuration_spec.rb +3 -3
- data/spec/features/backend/new_payment_spec.rb +1 -1
- data/spec/features/frontend/braintree_credit_card_checkout_spec.rb +3 -3
- data/spec/fixtures/views/spree/orders/edit.html.erb +1 -1
- data/spec/helpers/solidus_paypal_braintree/braintree_admin_helper_spec.rb +1 -1
- data/spec/helpers/solidus_paypal_braintree/braintree_checkout_helper_spec.rb +5 -5
- data/spec/models/solidus_paypal_braintree/address_spec.rb +1 -1
- data/spec/models/solidus_paypal_braintree/avs_result_spec.rb +1 -1
- data/spec/models/solidus_paypal_braintree/gateway_spec.rb +11 -11
- data/spec/models/solidus_paypal_braintree/response_spec.rb +1 -1
- data/spec/models/solidus_paypal_braintree/source_spec.rb +2 -2
- data/spec/models/solidus_paypal_braintree/transaction_address_spec.rb +1 -1
- data/spec/models/solidus_paypal_braintree/transaction_import_spec.rb +12 -12
- data/spec/models/solidus_paypal_braintree/transaction_spec.rb +2 -2
- data/spec/requests/spree/api/orders_controller_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -2
- data/spec/support/gateway_helpers.rb +3 -3
- metadata +9 -174
- data/app/assets/config/solidus_paypal_braintree_manifest.js +0 -1
- data/app/assets/images/solidus_paypal_braintree/venmo/venmo_active_blue_button_280x48.svg +0 -19
- data/app/assets/images/solidus_paypal_braintree/venmo/venmo_active_blue_button_320x48.svg +0 -19
- data/app/assets/images/solidus_paypal_braintree/venmo/venmo_active_blue_button_375x48.svg +0 -19
- data/app/assets/images/solidus_paypal_braintree/venmo/venmo_active_white_button_280x48.svg +0 -19
- data/app/assets/images/solidus_paypal_braintree/venmo/venmo_active_white_button_320x48.svg +0 -19
- data/app/assets/images/solidus_paypal_braintree/venmo/venmo_active_white_button_375x48.svg +0 -19
- data/app/assets/images/solidus_paypal_braintree/venmo/venmo_blue_acceptance_mark.svg +0 -15
- data/app/assets/images/solidus_paypal_braintree/venmo/venmo_blue_button_280x48.svg +0 -19
- data/app/assets/images/solidus_paypal_braintree/venmo/venmo_blue_button_320x48.svg +0 -19
- data/app/assets/images/solidus_paypal_braintree/venmo/venmo_blue_button_375x48.svg +0 -19
- data/app/assets/images/solidus_paypal_braintree/venmo/venmo_blue_logo.svg +0 -18
- data/app/assets/images/solidus_paypal_braintree/venmo/venmo_white_acceptance_mark.svg +0 -20
- data/app/assets/images/solidus_paypal_braintree/venmo/venmo_white_button_280x48.svg +0 -19
- data/app/assets/images/solidus_paypal_braintree/venmo/venmo_white_button_320x48.svg +0 -19
- data/app/assets/images/solidus_paypal_braintree/venmo/venmo_white_button_375x48.svg +0 -19
- data/app/assets/images/solidus_paypal_braintree/venmo/venmo_white_logo.svg +0 -18
- data/app/assets/javascripts/solidus_paypal_braintree/apple_pay_button.js +0 -179
- data/app/assets/javascripts/solidus_paypal_braintree/checkout.js +0 -108
- data/app/assets/javascripts/solidus_paypal_braintree/client.js +0 -239
- data/app/assets/javascripts/solidus_paypal_braintree/constants.js +0 -89
- data/app/assets/javascripts/solidus_paypal_braintree/frontend.js +0 -14
- data/app/assets/javascripts/solidus_paypal_braintree/hosted_form.js +0 -46
- data/app/assets/javascripts/solidus_paypal_braintree/paypal_button.js +0 -178
- data/app/assets/javascripts/solidus_paypal_braintree/paypal_messaging.js +0 -22
- data/app/assets/javascripts/solidus_paypal_braintree/promise.js +0 -20
- data/app/assets/javascripts/solidus_paypal_braintree/venmo_button.js +0 -86
- data/app/assets/javascripts/spree/backend/solidus_paypal_braintree.js +0 -96
- data/app/assets/javascripts/spree/frontend/paypal_button.js +0 -34
- data/app/assets/javascripts/spree/frontend/solidus_paypal_braintree.js +0 -1
- data/app/assets/stylesheets/spree/backend/solidus_paypal_braintree.css +0 -4
- data/app/assets/stylesheets/spree/backend/solidus_paypal_braintree.scss +0 -28
- data/app/assets/stylesheets/spree/frontend/solidus_paypal_braintree.css +0 -51
- data/app/decorators/controllers/solidus_paypal_braintree/admin_payments_controller_decorator.rb +0 -11
- data/app/decorators/controllers/solidus_paypal_braintree/checkout_controller_decorator.rb +0 -11
- data/app/decorators/controllers/solidus_paypal_braintree/client_tokens_controller.rb +0 -41
- data/app/decorators/controllers/solidus_paypal_braintree/orders_controller_decorator.rb +0 -11
- data/app/decorators/models/solidus_paypal_braintree/spree/store_decorator.rb +0 -20
- data/app/decorators/models/solidus_paypal_braintree/spree/user_decorator.rb +0 -13
- data/app/helpers/solidus_paypal_braintree/braintree_admin_helper.rb +0 -23
- data/app/helpers/solidus_paypal_braintree/braintree_checkout_helper.rb +0 -60
- data/app/models/application_record.rb +0 -5
- data/app/models/solidus_paypal_braintree/address.rb +0 -64
- data/app/models/solidus_paypal_braintree/avs_result.rb +0 -69
- data/app/models/solidus_paypal_braintree/configuration.rb +0 -39
- data/app/models/solidus_paypal_braintree/customer.rb +0 -8
- data/app/models/solidus_paypal_braintree/gateway.rb +0 -433
- data/app/models/solidus_paypal_braintree/response.rb +0 -80
- data/app/models/solidus_paypal_braintree/source.rb +0 -135
- data/app/models/solidus_paypal_braintree/transaction.rb +0 -31
- data/app/models/solidus_paypal_braintree/transaction_address.rb +0 -88
- data/app/models/solidus_paypal_braintree/transaction_import.rb +0 -98
- data/app/overrides/spree/payments/payment/add_paypal_funding_source_to_payment.rb +0 -9
- data/app/views/spree/api/payments/source_views/_paypal_braintree.json.jbuilder +0 -3
- data/app/views/spree/checkout/existing_payment/_paypal_braintree.html.erb +0 -10
- data/app/views/spree/shared/_apple_pay_button.html.erb +0 -27
- data/app/views/spree/shared/_braintree_errors.html.erb +0 -16
- data/app/views/spree/shared/_braintree_hosted_fields.html.erb +0 -43
- data/app/views/spree/shared/_paypal_braintree_head_scripts.html.erb +0 -26
- data/app/views/spree/shared/_paypal_cart_button.html.erb +0 -38
- data/app/views/spree/shared/_paypal_messaging.html.erb +0 -13
- data/app/views/spree/shared/_venmo_button.html.erb +0 -33
- data/config/locales/en.yml +0 -96
- data/config/locales/it.yml +0 -56
- data/config/routes.rb +0 -14
- data/db/migrate/20160830061749_create_solidus_paypal_braintree_sources.rb +0 -16
- data/db/migrate/20160906201711_create_solidus_paypal_braintree_customers.rb +0 -13
- data/db/migrate/20161114231422_create_solidus_paypal_braintree_configurations.rb +0 -11
- data/db/migrate/20161125172005_add_braintree_configuration_to_stores.rb +0 -7
- data/db/migrate/20170203191030_add_credit_card_to_braintree_configuration.rb +0 -6
- data/db/migrate/20170505193712_add_null_constraint_to_sources.rb +0 -32
- data/db/migrate/20170508085402_add_not_null_constraint_to_sources_payment_type.rb +0 -11
- data/db/migrate/20190705115327_add_paypal_button_preferences_to_braintree_configurations.rb +0 -5
- data/db/migrate/20190911141712_add_3d_secure_to_braintree_configuration.rb +0 -5
- data/db/migrate/20211222170950_add_paypal_funding_source_to_solidus_paypal_braintree_sources.rb +0 -5
- data/db/migrate/20220104150301_add_venmo_to_braintree_configuration.rb +0 -5
- data/lib/controllers/backend/solidus_paypal_braintree/configurations_controller.rb +0 -48
- data/lib/controllers/frontend/solidus_paypal_braintree/checkouts_controller.rb +0 -31
- data/lib/controllers/frontend/solidus_paypal_braintree/transactions_controller.rb +0 -67
- data/lib/generators/solidus_paypal_braintree/install/templates/initializer.rb +0 -6
- data/lib/solidus_paypal_braintree/country_mapper.rb +0 -37
- data/lib/solidus_paypal_braintree/extension_configuration.rb +0 -23
- data/lib/solidus_paypal_braintree/request_protection.rb +0 -21
- data/lib/solidus_paypal_braintree/testing_support/factories.rb +0 -53
- data/lib/views/backend/solidus_paypal_braintree/configurations/list.html.erb +0 -63
- data/lib/views/backend/spree/admin/payments/source_forms/_paypal_braintree.html.erb +0 -16
- data/lib/views/backend/spree/admin/payments/source_views/_paypal_braintree.html.erb +0 -39
- data/lib/views/backend/spree/admin/shared/preference_fields/_preference_select.html.erb +0 -13
- data/lib/views/backend_v1.2/spree/admin/payments/source_forms/_paypal_braintree.html.erb +0 -16
- data/lib/views/backend_v2.4/spree/admin/shared/preference_fields/_hash.html.erb +0 -12
- data/lib/views/frontend/solidus_paypal_braintree/payments/_payment.html.erb +0 -12
- data/lib/views/frontend/spree/checkout/payment/_paypal_braintree.html.erb +0 -23
- data/lib/views/frontend/spree/shared/_paypal_checkout_button.html.erb +0 -32
@@ -1,19 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<svg width="375px" height="48px" viewBox="0 0 375 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
-
<!-- Generator: Sketch 46.1 (44463) - http://www.bohemiancoding.com/sketch -->
|
4
|
-
<title>svg/blue_venmo_button_375x48</title>
|
5
|
-
<desc>Created with Sketch.</desc>
|
6
|
-
<defs></defs>
|
7
|
-
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
8
|
-
<g id="blue_venmo_button_375x48">
|
9
|
-
<rect id="Rectangle" fill="#3D95CE" x="0" y="0" width="375" height="48" rx="4"></rect>
|
10
|
-
<g id="Group" transform="translate(146.000000, 16.000000)" fill="#FFFFFF">
|
11
|
-
<path d="M14.1355722,0.0643062201 C14.6997229,0.996022242 14.9540614,1.95569119 14.9540614,3.16795034 C14.9540614,7.03443424 11.6533091,12.0572714 8.97435371,15.5842648 L2.85545503,15.5842648 L0.401435711,0.910859951 L5.75920168,0.402203543 L7.05667586,10.8432743 C8.26898429,8.86832019 9.76503373,5.76467606 9.76503373,3.64865382 C9.76503373,2.49041769 9.56660332,1.70150782 9.25650148,1.0519281 L14.1355722,0.0643062201 L14.1355722,0.0643062201 Z" id="Shape"></path>
|
12
|
-
<path d="M21.0794779,6.525633 C22.0654018,6.525633 24.5475201,6.07462046 24.5475201,4.66393896 C24.5475201,3.98655114 24.0685351,3.64865382 23.5040948,3.64865382 C22.5165776,3.64865382 21.2206966,4.83281521 21.0794779,6.525633 L21.0794779,6.525633 Z M20.9665029,9.31947756 C20.9665029,11.0419863 21.924328,11.7177809 23.1941378,11.7177809 C24.5769225,11.7177809 25.9009024,11.3798836 27.6217431,10.505377 L26.9735853,14.9065874 C25.7611321,15.4989577 23.8715531,15.8942092 22.0374478,15.8942092 C17.3850512,15.8942092 15.7199738,13.0728462 15.7199738,9.545708 C15.7199738,4.97417302 18.4284766,0.120067244 24.0124822,0.120067244 C27.08685,0.120067244 28.8059526,1.84243114 28.8059526,4.24073451 C28.8062423,8.10707358 23.8437439,9.29152463 20.9665029,9.31947756 L20.9665029,9.31947756 Z" id="Shape"></path>
|
13
|
-
<path d="M44.2677372,3.50758567 C44.2677372,4.07185827 44.1821369,4.89031424 44.0969712,5.42518557 L42.4892503,15.58412 L37.2722686,15.58412 L38.7387707,6.27159447 C38.7665799,6.01900427 38.8520354,5.51049269 38.8520354,5.22835639 C38.8520354,4.55096858 38.4288137,4.3819475 37.9199918,4.3819475 C37.2441697,4.3819475 36.5667543,4.69203673 36.1155786,4.918412 L34.4522393,15.5842648 L29.2058551,15.5842648 L31.6026627,0.374540282 L36.1433878,0.374540282 L36.2008892,1.58853744 C37.2721237,0.88319669 38.6827177,0.120356912 40.6841129,0.120356912 C43.3356936,0.120067244 44.2677372,1.47498771 44.2677372,3.50758567 L44.2677372,3.50758567 Z" id="Shape"></path>
|
14
|
-
<path d="M59.7554481,1.78507694 C61.2496147,0.713885943 62.6604983,0.120067244 64.6058406,0.120067244 C67.2846511,0.120067244 68.216405,1.47498771 68.216405,3.50758567 C68.216405,4.07185827 68.1310944,4.89031424 68.0459287,5.42518557 L66.4400908,15.58412 L61.2216606,15.58412 L62.7161168,6.07476529 C62.7436363,5.82058192 62.8014274,5.51049269 62.8014274,5.31380835 C62.8014274,4.55111341 62.3780609,4.3819475 61.8693838,4.3819475 C61.2213709,4.3819475 60.5736477,4.6640838 60.0927798,4.918412 L58.4297302,15.5842648 L53.2126036,15.5842648 L54.7070598,6.07491013 C54.7345794,5.82072676 54.7906323,5.51063753 54.7906323,5.31395319 C54.7906323,4.55125824 54.367121,4.38209233 53.860182,4.38209233 C53.1829115,4.38209233 52.5069445,4.69218156 52.0557688,4.91855683 L50.3911259,15.5844097 L45.1464798,15.5844097 L47.5429977,0.374685116 L52.0282492,0.374685116 L52.1691783,1.64444329 C53.2126036,0.883486357 54.6220389,0.12064658 56.511473,0.12064658 C58.1474376,0.120067244 59.2185273,0.825552826 59.7554481,1.78507694 L59.7554481,1.78507694 Z" id="Shape"></path>
|
15
|
-
<path d="M78.5990953,6.21583344 C78.5990953,4.97417302 78.288559,4.12761929 77.358688,4.12761929 C75.2997914,4.12761929 74.8770043,7.76743825 74.8770043,9.62942196 C74.8770043,11.0419863 75.2722719,11.9162033 76.2018532,11.9162033 C78.1479196,11.9162033 78.5990953,8.07767231 78.5990953,6.21583344 L78.5990953,6.21583344 Z M69.5751464,9.40463986 C69.5751464,4.60817794 72.1127383,0.120067244 77.9512273,0.120067244 C82.3505888,0.120067244 83.9587442,2.71679297 83.9587442,6.30099573 C83.9587442,11.0418415 81.4485271,15.9514186 75.4692539,15.9514186 C71.0415037,15.9514186 69.5751464,13.0446036 69.5751464,9.40463986 L69.5751464,9.40463986 Z" id="Shape"></path>
|
16
|
-
</g>
|
17
|
-
</g>
|
18
|
-
</g>
|
19
|
-
</svg>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<svg width="126px" height="24px" viewBox="0 0 126 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
-
<!-- Generator: Sketch 46.1 (44463) - http://www.bohemiancoding.com/sketch -->
|
4
|
-
<title>blue_logosvg/</title>
|
5
|
-
<desc>Created with Sketch.</desc>
|
6
|
-
<defs></defs>
|
7
|
-
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
8
|
-
<g id="blue_logo" fill="#3D95CE">
|
9
|
-
<g id="Group">
|
10
|
-
<path d="M21.2033583,0.0964593301 C22.0495843,1.49403336 22.4310921,2.93353679 22.4310921,4.75192551 C22.4310921,10.5516514 17.4799637,18.0859072 13.4615306,23.3763973 L4.28318255,23.3763973 L0.602153567,1.36628993 L8.63880252,0.603305315 L10.5850138,16.2649114 C12.4034764,13.3024803 14.6475506,8.6470141 14.6475506,5.47298073 C14.6475506,3.73562654 14.349905,2.55226174 13.8847522,1.57789215 L21.2033583,0.0964593301 L21.2033583,0.0964593301 Z" id="Shape"></path>
|
11
|
-
<path d="M31.6192168,9.7884495 C33.0981028,9.7884495 36.8212801,9.11193069 36.8212801,6.99590844 C36.8212801,5.97982672 36.1028027,5.47298073 35.2561421,5.47298073 C33.7748663,5.47298073 31.8310449,7.24922281 31.6192168,9.7884495 L31.6192168,9.7884495 Z M31.4497544,13.9792163 C31.4497544,16.5629794 32.8864919,17.5766714 34.7912066,17.5766714 C36.8653838,17.5766714 38.8513536,17.0698254 41.4326146,15.7580654 L40.460378,22.359881 C38.6416981,23.2484366 35.8073297,23.8413138 33.0561717,23.8413138 C26.0775769,23.8413138 23.5799608,19.6092694 23.5799608,14.318562 C23.5799608,7.46125954 27.6427148,0.180100866 36.0187232,0.180100866 C40.630275,0.180100866 43.2089289,2.76364671 43.2089289,6.36110177 C43.2093634,12.1606104 35.7656158,13.937287 31.4497544,13.9792163 L31.4497544,13.9792163 Z" id="Shape"></path>
|
12
|
-
<path d="M66.4016058,5.26137851 C66.4016058,6.1077874 66.2732054,7.33547136 66.1454568,8.13777835 L63.7338755,23.37618 L55.9084028,23.37618 L58.108156,9.4073917 C58.1498699,9.0285064 58.278053,8.26573904 58.278053,7.84253459 C58.278053,6.82645286 57.6432206,6.57292125 56.8799877,6.57292125 C55.8662545,6.57292125 54.8501315,7.03805509 54.1733679,7.377618 L51.6783589,23.3763973 L43.8087826,23.3763973 L47.403994,0.561810423 L54.2150817,0.561810423 L54.3013338,2.38280616 C55.9081856,1.32479503 58.0240766,0.180535368 61.0261694,0.180535368 C65.0035404,0.180100866 66.4016058,2.21248157 66.4016058,5.26137851 L66.4016058,5.26137851 Z" id="Shape"></path>
|
13
|
-
<path d="M89.6331722,2.67761541 C91.874422,1.07082892 93.9907475,0.180100866 96.9087609,0.180100866 C100.926977,0.180100866 102.324608,2.21248157 102.324608,5.26137851 C102.324608,6.1077874 102.196642,7.33547136 102.068893,8.13777835 L99.6601361,23.37618 L91.8324909,23.37618 L94.0741752,9.11214794 C94.1154545,8.73087288 94.2021411,8.26573904 94.2021411,7.97071253 C94.2021411,6.82667012 93.5670913,6.57292125 92.8040757,6.57292125 C91.8320564,6.57292125 90.8604715,6.9961257 90.1391698,7.377618 L87.6445953,23.3763973 L79.8189054,23.3763973 L82.0605897,9.11236519 C82.101869,8.73109013 82.1859485,8.26595629 82.1859485,7.97092978 C82.1859485,6.82688737 81.5506815,6.5731385 80.790273,6.5731385 C79.7743672,6.5731385 78.7604168,7.03827234 78.0836532,7.37783525 L75.5866889,23.3766145 L67.7197197,23.3766145 L71.3144966,0.562027674 L78.0423739,0.562027674 L78.2537674,2.46666494 C79.8189054,1.32522954 81.9330583,0.180969869 84.7672095,0.180969869 C87.2211564,0.180100866 88.827791,1.23832924 89.6331722,2.67761541 L89.6331722,2.67761541 Z" id="Shape"></path>
|
14
|
-
<path d="M117.898643,9.32375016 C117.898643,7.46125954 117.432838,6.19142894 116.038032,6.19142894 C112.949687,6.19142894 112.315506,11.6511574 112.315506,14.4441329 C112.315506,16.5629794 112.908408,17.8743049 114.30278,17.8743049 C117.221879,17.8743049 117.898643,12.1165085 117.898643,9.32375016 L117.898643,9.32375016 Z M104.36272,14.1069598 C104.36272,6.91226691 108.169107,0.180100866 116.926841,0.180100866 C123.525883,0.180100866 125.938116,4.07518945 125.938116,9.4514936 C125.938116,16.5627622 122.172791,23.9271279 113.203881,23.9271279 C106.562256,23.9271279 104.36272,19.5669055 104.36272,14.1069598 L104.36272,14.1069598 Z" id="Shape"></path>
|
15
|
-
</g>
|
16
|
-
</g>
|
17
|
-
</g>
|
18
|
-
</svg>
|
@@ -1,20 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<svg width="48px" height="32px" viewBox="0 0 48 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
-
<!-- Generator: Sketch 46.1 (44463) - http://www.bohemiancoding.com/sketch -->
|
4
|
-
<title>white_venmo_acceptance_marksvg/</title>
|
5
|
-
<desc>Created with Sketch.</desc>
|
6
|
-
<defs>
|
7
|
-
<rect id="path-1" x="0" y="0" width="48" height="32" rx="3.2"></rect>
|
8
|
-
</defs>
|
9
|
-
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
10
|
-
<g id="white_venmo_acceptance_mark">
|
11
|
-
<g id="Rectangle-115-+-Path-Copy">
|
12
|
-
<g id="Rectangle-115">
|
13
|
-
<use fill="#FFFFFF" fill-rule="evenodd" xlink:href="#path-1"></use>
|
14
|
-
<rect stroke="#EDEDED" stroke-width="1.2" x="0.6" y="0.6" width="46.8" height="30.8" rx="3.2"></rect>
|
15
|
-
</g>
|
16
|
-
<path d="M33.6,10.23957 C33.6,15.0228618 29.6080578,21.2366976 26.3681191,25.6 L18.9679002,25.6 L16,7.44728576 L22.4797022,6.81801842 L24.0488723,19.7348414 C25.5150427,17.2915927 27.3243705,13.4520228 27.3243705,10.8342563 C27.3243705,9.40138302 27.084388,8.42540945 26.7093497,7.62180353 L32.610116,6.4 C33.292402,7.55264145 33.6,8.73986394 33.6,10.23957 Z" id="Path" fill="#3D95CE"></path>
|
17
|
-
</g>
|
18
|
-
</g>
|
19
|
-
</g>
|
20
|
-
</svg>
|
@@ -1,19 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<svg width="280px" height="48px" viewBox="0 0 280 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
-
<!-- Generator: Sketch 46.1 (44463) - http://www.bohemiancoding.com/sketch -->
|
4
|
-
<title>svg/white_venmo_button_280x48</title>
|
5
|
-
<desc>Created with Sketch.</desc>
|
6
|
-
<defs></defs>
|
7
|
-
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
8
|
-
<g id="white_venmo_button_280x48">
|
9
|
-
<rect id="Rectangle" fill="#FFFFFF" x="0" y="0" width="280" height="48" rx="4"></rect>
|
10
|
-
<g id="Group" transform="translate(98.000000, 16.000000)" fill="#3D95CE">
|
11
|
-
<path d="M14.1355722,0.0643062201 C14.6997229,0.996022242 14.9540614,1.95569119 14.9540614,3.16795034 C14.9540614,7.03443424 11.6533091,12.0572714 8.97435371,15.5842648 L2.85545503,15.5842648 L0.401435711,0.910859951 L5.75920168,0.402203543 L7.05667586,10.8432743 C8.26898429,8.86832019 9.76503373,5.76467606 9.76503373,3.64865382 C9.76503373,2.49041769 9.56660332,1.70150782 9.25650148,1.0519281 L14.1355722,0.0643062201 L14.1355722,0.0643062201 Z" id="Shape"></path>
|
12
|
-
<path d="M21.0794779,6.525633 C22.0654018,6.525633 24.5475201,6.07462046 24.5475201,4.66393896 C24.5475201,3.98655114 24.0685351,3.64865382 23.5040948,3.64865382 C22.5165776,3.64865382 21.2206966,4.83281521 21.0794779,6.525633 L21.0794779,6.525633 Z M20.9665029,9.31947756 C20.9665029,11.0419863 21.924328,11.7177809 23.1941378,11.7177809 C24.5769225,11.7177809 25.9009024,11.3798836 27.6217431,10.505377 L26.9735853,14.9065874 C25.7611321,15.4989577 23.8715531,15.8942092 22.0374478,15.8942092 C17.3850512,15.8942092 15.7199738,13.0728462 15.7199738,9.545708 C15.7199738,4.97417302 18.4284766,0.120067244 24.0124822,0.120067244 C27.08685,0.120067244 28.8059526,1.84243114 28.8059526,4.24073451 C28.8062423,8.10707358 23.8437439,9.29152463 20.9665029,9.31947756 L20.9665029,9.31947756 Z" id="Shape"></path>
|
13
|
-
<path d="M44.2677372,3.50758567 C44.2677372,4.07185827 44.1821369,4.89031424 44.0969712,5.42518557 L42.4892503,15.58412 L37.2722686,15.58412 L38.7387707,6.27159447 C38.7665799,6.01900427 38.8520354,5.51049269 38.8520354,5.22835639 C38.8520354,4.55096858 38.4288137,4.3819475 37.9199918,4.3819475 C37.2441697,4.3819475 36.5667543,4.69203673 36.1155786,4.918412 L34.4522393,15.5842648 L29.2058551,15.5842648 L31.6026627,0.374540282 L36.1433878,0.374540282 L36.2008892,1.58853744 C37.2721237,0.88319669 38.6827177,0.120356912 40.6841129,0.120356912 C43.3356936,0.120067244 44.2677372,1.47498771 44.2677372,3.50758567 L44.2677372,3.50758567 Z" id="Shape"></path>
|
14
|
-
<path d="M59.7554481,1.78507694 C61.2496147,0.713885943 62.6604983,0.120067244 64.6058406,0.120067244 C67.2846511,0.120067244 68.216405,1.47498771 68.216405,3.50758567 C68.216405,4.07185827 68.1310944,4.89031424 68.0459287,5.42518557 L66.4400908,15.58412 L61.2216606,15.58412 L62.7161168,6.07476529 C62.7436363,5.82058192 62.8014274,5.51049269 62.8014274,5.31380835 C62.8014274,4.55111341 62.3780609,4.3819475 61.8693838,4.3819475 C61.2213709,4.3819475 60.5736477,4.6640838 60.0927798,4.918412 L58.4297302,15.5842648 L53.2126036,15.5842648 L54.7070598,6.07491013 C54.7345794,5.82072676 54.7906323,5.51063753 54.7906323,5.31395319 C54.7906323,4.55125824 54.367121,4.38209233 53.860182,4.38209233 C53.1829115,4.38209233 52.5069445,4.69218156 52.0557688,4.91855683 L50.3911259,15.5844097 L45.1464798,15.5844097 L47.5429977,0.374685116 L52.0282492,0.374685116 L52.1691783,1.64444329 C53.2126036,0.883486357 54.6220389,0.12064658 56.511473,0.12064658 C58.1474376,0.120067244 59.2185273,0.825552826 59.7554481,1.78507694 L59.7554481,1.78507694 Z" id="Shape"></path>
|
15
|
-
<path d="M78.5990953,6.21583344 C78.5990953,4.97417302 78.288559,4.12761929 77.358688,4.12761929 C75.2997914,4.12761929 74.8770043,7.76743825 74.8770043,9.62942196 C74.8770043,11.0419863 75.2722719,11.9162033 76.2018532,11.9162033 C78.1479196,11.9162033 78.5990953,8.07767231 78.5990953,6.21583344 L78.5990953,6.21583344 Z M69.5751464,9.40463986 C69.5751464,4.60817794 72.1127383,0.120067244 77.9512273,0.120067244 C82.3505888,0.120067244 83.9587442,2.71679297 83.9587442,6.30099573 C83.9587442,11.0418415 81.4485271,15.9514186 75.4692539,15.9514186 C71.0415037,15.9514186 69.5751464,13.0446036 69.5751464,9.40463986 L69.5751464,9.40463986 Z" id="Shape"></path>
|
16
|
-
</g>
|
17
|
-
</g>
|
18
|
-
</g>
|
19
|
-
</svg>
|
@@ -1,19 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<svg width="320px" height="48px" viewBox="0 0 320 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
-
<!-- Generator: Sketch 46.1 (44463) - http://www.bohemiancoding.com/sketch -->
|
4
|
-
<title>svg/white_venmo_button_320x48</title>
|
5
|
-
<desc>Created with Sketch.</desc>
|
6
|
-
<defs></defs>
|
7
|
-
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
8
|
-
<g id="white_venmo_button_320x48">
|
9
|
-
<rect id="Rectangle" fill="#FFFFFF" x="0" y="0" width="320" height="48" rx="4"></rect>
|
10
|
-
<g id="Group" transform="translate(118.000000, 16.000000)" fill="#3D95CE">
|
11
|
-
<path d="M14.1355722,0.0643062201 C14.6997229,0.996022242 14.9540614,1.95569119 14.9540614,3.16795034 C14.9540614,7.03443424 11.6533091,12.0572714 8.97435371,15.5842648 L2.85545503,15.5842648 L0.401435711,0.910859951 L5.75920168,0.402203543 L7.05667586,10.8432743 C8.26898429,8.86832019 9.76503373,5.76467606 9.76503373,3.64865382 C9.76503373,2.49041769 9.56660332,1.70150782 9.25650148,1.0519281 L14.1355722,0.0643062201 L14.1355722,0.0643062201 Z" id="Shape"></path>
|
12
|
-
<path d="M21.0794779,6.525633 C22.0654018,6.525633 24.5475201,6.07462046 24.5475201,4.66393896 C24.5475201,3.98655114 24.0685351,3.64865382 23.5040948,3.64865382 C22.5165776,3.64865382 21.2206966,4.83281521 21.0794779,6.525633 L21.0794779,6.525633 Z M20.9665029,9.31947756 C20.9665029,11.0419863 21.924328,11.7177809 23.1941378,11.7177809 C24.5769225,11.7177809 25.9009024,11.3798836 27.6217431,10.505377 L26.9735853,14.9065874 C25.7611321,15.4989577 23.8715531,15.8942092 22.0374478,15.8942092 C17.3850512,15.8942092 15.7199738,13.0728462 15.7199738,9.545708 C15.7199738,4.97417302 18.4284766,0.120067244 24.0124822,0.120067244 C27.08685,0.120067244 28.8059526,1.84243114 28.8059526,4.24073451 C28.8062423,8.10707358 23.8437439,9.29152463 20.9665029,9.31947756 L20.9665029,9.31947756 Z" id="Shape"></path>
|
13
|
-
<path d="M44.2677372,3.50758567 C44.2677372,4.07185827 44.1821369,4.89031424 44.0969712,5.42518557 L42.4892503,15.58412 L37.2722686,15.58412 L38.7387707,6.27159447 C38.7665799,6.01900427 38.8520354,5.51049269 38.8520354,5.22835639 C38.8520354,4.55096858 38.4288137,4.3819475 37.9199918,4.3819475 C37.2441697,4.3819475 36.5667543,4.69203673 36.1155786,4.918412 L34.4522393,15.5842648 L29.2058551,15.5842648 L31.6026627,0.374540282 L36.1433878,0.374540282 L36.2008892,1.58853744 C37.2721237,0.88319669 38.6827177,0.120356912 40.6841129,0.120356912 C43.3356936,0.120067244 44.2677372,1.47498771 44.2677372,3.50758567 L44.2677372,3.50758567 Z" id="Shape"></path>
|
14
|
-
<path d="M59.7554481,1.78507694 C61.2496147,0.713885943 62.6604983,0.120067244 64.6058406,0.120067244 C67.2846511,0.120067244 68.216405,1.47498771 68.216405,3.50758567 C68.216405,4.07185827 68.1310944,4.89031424 68.0459287,5.42518557 L66.4400908,15.58412 L61.2216606,15.58412 L62.7161168,6.07476529 C62.7436363,5.82058192 62.8014274,5.51049269 62.8014274,5.31380835 C62.8014274,4.55111341 62.3780609,4.3819475 61.8693838,4.3819475 C61.2213709,4.3819475 60.5736477,4.6640838 60.0927798,4.918412 L58.4297302,15.5842648 L53.2126036,15.5842648 L54.7070598,6.07491013 C54.7345794,5.82072676 54.7906323,5.51063753 54.7906323,5.31395319 C54.7906323,4.55125824 54.367121,4.38209233 53.860182,4.38209233 C53.1829115,4.38209233 52.5069445,4.69218156 52.0557688,4.91855683 L50.3911259,15.5844097 L45.1464798,15.5844097 L47.5429977,0.374685116 L52.0282492,0.374685116 L52.1691783,1.64444329 C53.2126036,0.883486357 54.6220389,0.12064658 56.511473,0.12064658 C58.1474376,0.120067244 59.2185273,0.825552826 59.7554481,1.78507694 L59.7554481,1.78507694 Z" id="Shape"></path>
|
15
|
-
<path d="M78.5990953,6.21583344 C78.5990953,4.97417302 78.288559,4.12761929 77.358688,4.12761929 C75.2997914,4.12761929 74.8770043,7.76743825 74.8770043,9.62942196 C74.8770043,11.0419863 75.2722719,11.9162033 76.2018532,11.9162033 C78.1479196,11.9162033 78.5990953,8.07767231 78.5990953,6.21583344 L78.5990953,6.21583344 Z M69.5751464,9.40463986 C69.5751464,4.60817794 72.1127383,0.120067244 77.9512273,0.120067244 C82.3505888,0.120067244 83.9587442,2.71679297 83.9587442,6.30099573 C83.9587442,11.0418415 81.4485271,15.9514186 75.4692539,15.9514186 C71.0415037,15.9514186 69.5751464,13.0446036 69.5751464,9.40463986 L69.5751464,9.40463986 Z" id="Shape"></path>
|
16
|
-
</g>
|
17
|
-
</g>
|
18
|
-
</g>
|
19
|
-
</svg>
|
@@ -1,19 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<svg width="375px" height="48px" viewBox="0 0 375 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
-
<!-- Generator: Sketch 46.1 (44463) - http://www.bohemiancoding.com/sketch -->
|
4
|
-
<title>svg/white_venmo_button_375x48</title>
|
5
|
-
<desc>Created with Sketch.</desc>
|
6
|
-
<defs></defs>
|
7
|
-
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
8
|
-
<g id="white_venmo_button_375x48">
|
9
|
-
<rect id="Rectangle" fill="#FFFFFF" x="0" y="0" width="375" height="48" rx="4"></rect>
|
10
|
-
<g id="Group" transform="translate(146.000000, 16.000000)" fill="#3D95CE">
|
11
|
-
<path d="M14.1355722,0.0643062201 C14.6997229,0.996022242 14.9540614,1.95569119 14.9540614,3.16795034 C14.9540614,7.03443424 11.6533091,12.0572714 8.97435371,15.5842648 L2.85545503,15.5842648 L0.401435711,0.910859951 L5.75920168,0.402203543 L7.05667586,10.8432743 C8.26898429,8.86832019 9.76503373,5.76467606 9.76503373,3.64865382 C9.76503373,2.49041769 9.56660332,1.70150782 9.25650148,1.0519281 L14.1355722,0.0643062201 L14.1355722,0.0643062201 Z" id="Shape"></path>
|
12
|
-
<path d="M21.0794779,6.525633 C22.0654018,6.525633 24.5475201,6.07462046 24.5475201,4.66393896 C24.5475201,3.98655114 24.0685351,3.64865382 23.5040948,3.64865382 C22.5165776,3.64865382 21.2206966,4.83281521 21.0794779,6.525633 L21.0794779,6.525633 Z M20.9665029,9.31947756 C20.9665029,11.0419863 21.924328,11.7177809 23.1941378,11.7177809 C24.5769225,11.7177809 25.9009024,11.3798836 27.6217431,10.505377 L26.9735853,14.9065874 C25.7611321,15.4989577 23.8715531,15.8942092 22.0374478,15.8942092 C17.3850512,15.8942092 15.7199738,13.0728462 15.7199738,9.545708 C15.7199738,4.97417302 18.4284766,0.120067244 24.0124822,0.120067244 C27.08685,0.120067244 28.8059526,1.84243114 28.8059526,4.24073451 C28.8062423,8.10707358 23.8437439,9.29152463 20.9665029,9.31947756 L20.9665029,9.31947756 Z" id="Shape"></path>
|
13
|
-
<path d="M44.2677372,3.50758567 C44.2677372,4.07185827 44.1821369,4.89031424 44.0969712,5.42518557 L42.4892503,15.58412 L37.2722686,15.58412 L38.7387707,6.27159447 C38.7665799,6.01900427 38.8520354,5.51049269 38.8520354,5.22835639 C38.8520354,4.55096858 38.4288137,4.3819475 37.9199918,4.3819475 C37.2441697,4.3819475 36.5667543,4.69203673 36.1155786,4.918412 L34.4522393,15.5842648 L29.2058551,15.5842648 L31.6026627,0.374540282 L36.1433878,0.374540282 L36.2008892,1.58853744 C37.2721237,0.88319669 38.6827177,0.120356912 40.6841129,0.120356912 C43.3356936,0.120067244 44.2677372,1.47498771 44.2677372,3.50758567 L44.2677372,3.50758567 Z" id="Shape"></path>
|
14
|
-
<path d="M59.7554481,1.78507694 C61.2496147,0.713885943 62.6604983,0.120067244 64.6058406,0.120067244 C67.2846511,0.120067244 68.216405,1.47498771 68.216405,3.50758567 C68.216405,4.07185827 68.1310944,4.89031424 68.0459287,5.42518557 L66.4400908,15.58412 L61.2216606,15.58412 L62.7161168,6.07476529 C62.7436363,5.82058192 62.8014274,5.51049269 62.8014274,5.31380835 C62.8014274,4.55111341 62.3780609,4.3819475 61.8693838,4.3819475 C61.2213709,4.3819475 60.5736477,4.6640838 60.0927798,4.918412 L58.4297302,15.5842648 L53.2126036,15.5842648 L54.7070598,6.07491013 C54.7345794,5.82072676 54.7906323,5.51063753 54.7906323,5.31395319 C54.7906323,4.55125824 54.367121,4.38209233 53.860182,4.38209233 C53.1829115,4.38209233 52.5069445,4.69218156 52.0557688,4.91855683 L50.3911259,15.5844097 L45.1464798,15.5844097 L47.5429977,0.374685116 L52.0282492,0.374685116 L52.1691783,1.64444329 C53.2126036,0.883486357 54.6220389,0.12064658 56.511473,0.12064658 C58.1474376,0.120067244 59.2185273,0.825552826 59.7554481,1.78507694 L59.7554481,1.78507694 Z" id="Shape"></path>
|
15
|
-
<path d="M78.5990953,6.21583344 C78.5990953,4.97417302 78.288559,4.12761929 77.358688,4.12761929 C75.2997914,4.12761929 74.8770043,7.76743825 74.8770043,9.62942196 C74.8770043,11.0419863 75.2722719,11.9162033 76.2018532,11.9162033 C78.1479196,11.9162033 78.5990953,8.07767231 78.5990953,6.21583344 L78.5990953,6.21583344 Z M69.5751464,9.40463986 C69.5751464,4.60817794 72.1127383,0.120067244 77.9512273,0.120067244 C82.3505888,0.120067244 83.9587442,2.71679297 83.9587442,6.30099573 C83.9587442,11.0418415 81.4485271,15.9514186 75.4692539,15.9514186 C71.0415037,15.9514186 69.5751464,13.0446036 69.5751464,9.40463986 L69.5751464,9.40463986 Z" id="Shape"></path>
|
16
|
-
</g>
|
17
|
-
</g>
|
18
|
-
</g>
|
19
|
-
</svg>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<svg width="126px" height="24px" viewBox="0 0 126 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
-
<!-- Generator: Sketch 46.1 (44463) - http://www.bohemiancoding.com/sketch -->
|
4
|
-
<title>white_logosvg/</title>
|
5
|
-
<desc>Created with Sketch.</desc>
|
6
|
-
<defs></defs>
|
7
|
-
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
8
|
-
<g id="white_logo" fill="#FFFFFF">
|
9
|
-
<g id="Group">
|
10
|
-
<path d="M21.2033583,0.0964593301 C22.0495843,1.49403336 22.4310921,2.93353679 22.4310921,4.75192551 C22.4310921,10.5516514 17.4799637,18.0859072 13.4615306,23.3763973 L4.28318255,23.3763973 L0.602153567,1.36628993 L8.63880252,0.603305315 L10.5850138,16.2649114 C12.4034764,13.3024803 14.6475506,8.6470141 14.6475506,5.47298073 C14.6475506,3.73562654 14.349905,2.55226174 13.8847522,1.57789215 L21.2033583,0.0964593301 L21.2033583,0.0964593301 Z" id="Shape"></path>
|
11
|
-
<path d="M31.6192168,9.7884495 C33.0981028,9.7884495 36.8212801,9.11193069 36.8212801,6.99590844 C36.8212801,5.97982672 36.1028027,5.47298073 35.2561421,5.47298073 C33.7748663,5.47298073 31.8310449,7.24922281 31.6192168,9.7884495 L31.6192168,9.7884495 Z M31.4497544,13.9792163 C31.4497544,16.5629794 32.8864919,17.5766714 34.7912066,17.5766714 C36.8653838,17.5766714 38.8513536,17.0698254 41.4326146,15.7580654 L40.460378,22.359881 C38.6416981,23.2484366 35.8073297,23.8413138 33.0561717,23.8413138 C26.0775769,23.8413138 23.5799608,19.6092694 23.5799608,14.318562 C23.5799608,7.46125954 27.6427148,0.180100866 36.0187232,0.180100866 C40.630275,0.180100866 43.2089289,2.76364671 43.2089289,6.36110177 C43.2093634,12.1606104 35.7656158,13.937287 31.4497544,13.9792163 L31.4497544,13.9792163 Z" id="Shape"></path>
|
12
|
-
<path d="M66.4016058,5.26137851 C66.4016058,6.1077874 66.2732054,7.33547136 66.1454568,8.13777835 L63.7338755,23.37618 L55.9084028,23.37618 L58.108156,9.4073917 C58.1498699,9.0285064 58.278053,8.26573904 58.278053,7.84253459 C58.278053,6.82645286 57.6432206,6.57292125 56.8799877,6.57292125 C55.8662545,6.57292125 54.8501315,7.03805509 54.1733679,7.377618 L51.6783589,23.3763973 L43.8087826,23.3763973 L47.403994,0.561810423 L54.2150817,0.561810423 L54.3013338,2.38280616 C55.9081856,1.32479503 58.0240766,0.180535368 61.0261694,0.180535368 C65.0035404,0.180100866 66.4016058,2.21248157 66.4016058,5.26137851 L66.4016058,5.26137851 Z" id="Shape"></path>
|
13
|
-
<path d="M89.6331722,2.67761541 C91.874422,1.07082892 93.9907475,0.180100866 96.9087609,0.180100866 C100.926977,0.180100866 102.324608,2.21248157 102.324608,5.26137851 C102.324608,6.1077874 102.196642,7.33547136 102.068893,8.13777835 L99.6601361,23.37618 L91.8324909,23.37618 L94.0741752,9.11214794 C94.1154545,8.73087288 94.2021411,8.26573904 94.2021411,7.97071253 C94.2021411,6.82667012 93.5670913,6.57292125 92.8040757,6.57292125 C91.8320564,6.57292125 90.8604715,6.9961257 90.1391698,7.377618 L87.6445953,23.3763973 L79.8189054,23.3763973 L82.0605897,9.11236519 C82.101869,8.73109013 82.1859485,8.26595629 82.1859485,7.97092978 C82.1859485,6.82688737 81.5506815,6.5731385 80.790273,6.5731385 C79.7743672,6.5731385 78.7604168,7.03827234 78.0836532,7.37783525 L75.5866889,23.3766145 L67.7197197,23.3766145 L71.3144966,0.562027674 L78.0423739,0.562027674 L78.2537674,2.46666494 C79.8189054,1.32522954 81.9330583,0.180969869 84.7672095,0.180969869 C87.2211564,0.180100866 88.827791,1.23832924 89.6331722,2.67761541 L89.6331722,2.67761541 Z" id="Shape"></path>
|
14
|
-
<path d="M117.898643,9.32375016 C117.898643,7.46125954 117.432838,6.19142894 116.038032,6.19142894 C112.949687,6.19142894 112.315506,11.6511574 112.315506,14.4441329 C112.315506,16.5629794 112.908408,17.8743049 114.30278,17.8743049 C117.221879,17.8743049 117.898643,12.1165085 117.898643,9.32375016 L117.898643,9.32375016 Z M104.36272,14.1069598 C104.36272,6.91226691 108.169107,0.180100866 116.926841,0.180100866 C123.525883,0.180100866 125.938116,4.07518945 125.938116,9.4514936 C125.938116,16.5627622 122.172791,23.9271279 113.203881,23.9271279 C106.562256,23.9271279 104.36272,19.5669055 104.36272,14.1069598 L104.36272,14.1069598 Z" id="Shape"></path>
|
15
|
-
</g>
|
16
|
-
</g>
|
17
|
-
</g>
|
18
|
-
</svg>
|
@@ -1,179 +0,0 @@
|
|
1
|
-
//= require solidus_paypal_braintree/constants
|
2
|
-
/**
|
3
|
-
* Constructor for Apple Pay button object
|
4
|
-
* @constructor
|
5
|
-
* @param {object} element - The DOM element of your Apple Pay button
|
6
|
-
*/
|
7
|
-
SolidusPaypalBraintree.ApplepayButton = function(element, applepayOptions) {
|
8
|
-
this._element = element;
|
9
|
-
this._applepayOptions = applepayOptions || {};
|
10
|
-
this._client = null;
|
11
|
-
|
12
|
-
if(!this._element) {
|
13
|
-
throw new Error("Element for the Apple Pay button must be present on the page");
|
14
|
-
}
|
15
|
-
};
|
16
|
-
|
17
|
-
/**
|
18
|
-
* Creates the Apple Pay session using the provided options and enables the button
|
19
|
-
*
|
20
|
-
* @param {object} options - The options passed to tokenize when constructing
|
21
|
-
* the Apple Pay instance
|
22
|
-
*
|
23
|
-
* See {@link https://braintree.github.io/braintree-web/3.9.0/Apple Pay.html#tokenize}
|
24
|
-
*/
|
25
|
-
SolidusPaypalBraintree.ApplepayButton.prototype.initialize = function() {
|
26
|
-
if (window.ApplePaySession && ApplePaySession.canMakePayments()) {
|
27
|
-
this._client = new SolidusPaypalBraintree.createClient(
|
28
|
-
{
|
29
|
-
useDataCollector: false,
|
30
|
-
useApplepay: true,
|
31
|
-
paymentMethodId: this._applepayOptions.paymentMethodId
|
32
|
-
}
|
33
|
-
);
|
34
|
-
return this._client.initialize().then(this.initializeCallback.bind(this));
|
35
|
-
}
|
36
|
-
};
|
37
|
-
|
38
|
-
SolidusPaypalBraintree.ApplepayButton.prototype.initializeCallback = function() {
|
39
|
-
this._paymentMethodId = this._client.paymentMethodId;
|
40
|
-
this._applePayInstance = this._client.getApplepayInstance();
|
41
|
-
|
42
|
-
this._element.removeAttribute('disabled');
|
43
|
-
this._element.classList.add("visible");
|
44
|
-
this._element.addEventListener('click', function(event) {
|
45
|
-
this.initializeApplePaySession();
|
46
|
-
event.preventDefault();
|
47
|
-
}.bind(this), false);
|
48
|
-
};
|
49
|
-
|
50
|
-
/**
|
51
|
-
* Initialize and begin the ApplePay session
|
52
|
-
**/
|
53
|
-
SolidusPaypalBraintree.ApplepayButton.prototype.initializeApplePaySession = function() {
|
54
|
-
var paymentRequest = this._applePayInstance.createPaymentRequest(this._paymentRequestHash());
|
55
|
-
var session = new ApplePaySession(SolidusPaypalBraintree.APPLE_PAY_API_VERSION, paymentRequest);
|
56
|
-
var applePayButton = this;
|
57
|
-
|
58
|
-
session.onvalidatemerchant = function (event) {
|
59
|
-
applePayButton.validateMerchant(session, paymentRequest);
|
60
|
-
};
|
61
|
-
|
62
|
-
session.onpaymentauthorized = function (event) {
|
63
|
-
applePayButton.tokenize(session, event.payment);
|
64
|
-
};
|
65
|
-
|
66
|
-
session.begin();
|
67
|
-
};
|
68
|
-
|
69
|
-
SolidusPaypalBraintree.ApplepayButton.prototype.validateMerchant = function(session, paymentRequest) {
|
70
|
-
this._applePayInstance.performValidation({
|
71
|
-
validationURL: event.validationURL,
|
72
|
-
displayName: paymentRequest.total.label,
|
73
|
-
}, function (validationErr, merchantSession) {
|
74
|
-
if (validationErr) {
|
75
|
-
console.error('Error validating Apple Pay:', validationErr);
|
76
|
-
session.abort();
|
77
|
-
return;
|
78
|
-
}
|
79
|
-
session.completeMerchantValidation(merchantSession);
|
80
|
-
});
|
81
|
-
};
|
82
|
-
|
83
|
-
SolidusPaypalBraintree.ApplepayButton.prototype.tokenize = function (session, payment) {
|
84
|
-
this._applePayInstance.tokenize(
|
85
|
-
{token: payment.token},
|
86
|
-
function (tokenizeErr, payload) {
|
87
|
-
if (tokenizeErr) {
|
88
|
-
console.error('Error tokenizing Apple Pay:', tokenizeErr);
|
89
|
-
session.completePayment(ApplePaySession.STATUS_FAILURE);
|
90
|
-
}
|
91
|
-
this._createTransaction(session, payment, payload);
|
92
|
-
}.bind(this)
|
93
|
-
);
|
94
|
-
};
|
95
|
-
|
96
|
-
SolidusPaypalBraintree.ApplepayButton.prototype._createTransaction = function (session, payment, payload) {
|
97
|
-
Spree.ajax({
|
98
|
-
data: this._transactionParams(payload, payment.shippingContact),
|
99
|
-
dataType: 'json',
|
100
|
-
type: 'POST',
|
101
|
-
url: SolidusPaypalBraintree.config.paths.transactions,
|
102
|
-
success: function(response) {
|
103
|
-
session.completePayment(ApplePaySession.STATUS_SUCCESS);
|
104
|
-
window.location.replace(response.redirectUrl);
|
105
|
-
},
|
106
|
-
error: function(xhr) {
|
107
|
-
if (xhr.status === 422) {
|
108
|
-
var errors = xhr.responseJSON.errors;
|
109
|
-
|
110
|
-
if (errors && errors.Address) {
|
111
|
-
session.completePayment(ApplePaySession.STATUS_INVALID_SHIPPING_POSTAL_ADDRESS);
|
112
|
-
} else {
|
113
|
-
session.completePayment(ApplePaySession.STATUS_FAILURE);
|
114
|
-
}
|
115
|
-
}
|
116
|
-
}
|
117
|
-
});
|
118
|
-
};
|
119
|
-
|
120
|
-
// countryCode
|
121
|
-
// currencyCode
|
122
|
-
// merchantCapabilities
|
123
|
-
// supportedNetworks
|
124
|
-
// ... are added by the Braintree gateway, but can be overridden
|
125
|
-
// See https://developer.apple.com/documentation/applepayjs/applepaypaymentrequest
|
126
|
-
SolidusPaypalBraintree.ApplepayButton.prototype._paymentRequestHash = function() {
|
127
|
-
return {
|
128
|
-
total: {
|
129
|
-
label: this._applepayOptions.storeName,
|
130
|
-
amount: this._applepayOptions.amount
|
131
|
-
},
|
132
|
-
shippingContact: this._applepayOptions.shippingContact,
|
133
|
-
requiredShippingContactFields: ['postalAddress', 'phone', 'email']
|
134
|
-
};
|
135
|
-
};
|
136
|
-
|
137
|
-
/**
|
138
|
-
* Builds the transaction parameters to submit to Solidus for the given
|
139
|
-
* payload returned by Braintree
|
140
|
-
*
|
141
|
-
* @param {object} payload - The payload returned by Braintree after tokenization
|
142
|
-
*/
|
143
|
-
SolidusPaypalBraintree.ApplepayButton.prototype._transactionParams = function(payload, shippingContact) {
|
144
|
-
return {
|
145
|
-
payment_method_id: this._applepayOptions.paymentMethodId,
|
146
|
-
transaction: {
|
147
|
-
email: shippingContact.emailAddress,
|
148
|
-
nonce: payload.nonce,
|
149
|
-
payment_type: payload.type,
|
150
|
-
phone: shippingContact.phoneNumber,
|
151
|
-
address_attributes: this._addressParams(shippingContact)
|
152
|
-
}
|
153
|
-
};
|
154
|
-
};
|
155
|
-
|
156
|
-
/**
|
157
|
-
* Builds the address parameters to submit to Solidus using the payload
|
158
|
-
* returned by Braintree
|
159
|
-
*
|
160
|
-
* @param {object} payload - The payload returned by Braintree after tokenization
|
161
|
-
*/
|
162
|
-
SolidusPaypalBraintree.ApplepayButton.prototype._addressParams = function(shippingContact) {
|
163
|
-
var addressHash = {
|
164
|
-
country_name: shippingContact.country,
|
165
|
-
country_code: shippingContact.countryCode,
|
166
|
-
first_name: shippingContact.givenName,
|
167
|
-
last_name: shippingContact.familyName,
|
168
|
-
state_code: shippingContact.administrativeArea,
|
169
|
-
city: shippingContact.locality,
|
170
|
-
zip: shippingContact.postalCode,
|
171
|
-
address_line_1: shippingContact.addressLines[0]
|
172
|
-
};
|
173
|
-
|
174
|
-
if(shippingContact.addressLines.length > 1) {
|
175
|
-
addressHash.address_line_2 = shippingContact.addressLines[1];
|
176
|
-
}
|
177
|
-
|
178
|
-
return addressHash;
|
179
|
-
};
|
@@ -1,108 +0,0 @@
|
|
1
|
-
//= require solidus_paypal_braintree/frontend
|
2
|
-
|
3
|
-
$(function() {
|
4
|
-
/* This provides a default error handler for Braintree. Since we prevent
|
5
|
-
* submission if tokenization fails, we need to manually re-enable the
|
6
|
-
* submit button. */
|
7
|
-
function braintreeError (err) {
|
8
|
-
SolidusPaypalBraintree.config.braintreeErrorHandle(err);
|
9
|
-
enableSubmit();
|
10
|
-
}
|
11
|
-
|
12
|
-
function enableSubmit() {
|
13
|
-
/* If we're using jquery-ujs on the frontend, it will automatically disable
|
14
|
-
* the submit button, but do so in a setTimeout here:
|
15
|
-
* https://github.com/rails/jquery-rails/blob/master/vendor/assets/javascripts/jquery_ujs.js#L517
|
16
|
-
* The only way we can re-enable it is by delaying longer than that timeout
|
17
|
-
* or stopping propagation so their submit handler doesn't run. */
|
18
|
-
if ($.rails && typeof $.rails.enableFormElement !== 'undefined') {
|
19
|
-
setTimeout(function () {
|
20
|
-
$.rails.enableFormElement($submitButton);
|
21
|
-
$submitButton.attr("disabled", false).removeClass("disabled").addClass("primary");
|
22
|
-
}, 100);
|
23
|
-
} else if (typeof Rails !== 'undefined' && typeof Rails.enableElement !== 'undefined') {
|
24
|
-
/* Indicates that we have rails-ujs instead of jquery-ujs. Rails-ujs was added to rails
|
25
|
-
* core in Rails 5.1.0 */
|
26
|
-
setTimeout(function () {
|
27
|
-
Rails.enableElement($submitButton[0]);
|
28
|
-
$submitButton.attr("disabled", false).removeClass("disabled").addClass("primary");
|
29
|
-
}, 100);
|
30
|
-
} else {
|
31
|
-
$submitButton.attr("disabled", false).removeClass("disabled").addClass("primary");
|
32
|
-
}
|
33
|
-
}
|
34
|
-
|
35
|
-
function disableSubmit() {
|
36
|
-
$submitButton.attr("disabled", true).removeClass("primary").addClass("disabled");
|
37
|
-
}
|
38
|
-
|
39
|
-
function addFormHook(braintreeForm, hostedField) {
|
40
|
-
$paymentForm.on("submit",function(event) {
|
41
|
-
var $field = $(hostedField);
|
42
|
-
|
43
|
-
if ($field.is(":visible") && !$field.data("submitting")) {
|
44
|
-
var $nonce = $("#payment_method_nonce", $field);
|
45
|
-
|
46
|
-
if ($nonce.length > 0 && $nonce.val() === "") {
|
47
|
-
var client = braintreeForm._merchantConfigurationOptions._solidusClient;
|
48
|
-
|
49
|
-
event.preventDefault();
|
50
|
-
disableSubmit();
|
51
|
-
|
52
|
-
braintreeForm.tokenize(function(error, payload) {
|
53
|
-
if (error) {
|
54
|
-
braintreeError(error);
|
55
|
-
return;
|
56
|
-
}
|
57
|
-
|
58
|
-
$nonce.val(payload.nonce);
|
59
|
-
|
60
|
-
if (!client.useThreeDSecure) {
|
61
|
-
$paymentForm.submit();
|
62
|
-
return;
|
63
|
-
}
|
64
|
-
|
65
|
-
threeDSecureOptions.nonce = payload.nonce;
|
66
|
-
threeDSecureOptions.bin = payload.details.bin;
|
67
|
-
threeDSecureOptions.onLookupComplete = function(data, next) {
|
68
|
-
next();
|
69
|
-
}
|
70
|
-
client._threeDSecureInstance.verifyCard(threeDSecureOptions, function(error, response) {
|
71
|
-
if (error === null && (!response.liabilityShiftPossible || response.liabilityShifted)) {
|
72
|
-
$nonce.val(response.nonce);
|
73
|
-
$paymentForm.submit();
|
74
|
-
} else {
|
75
|
-
$nonce.val('');
|
76
|
-
braintreeError(error || { code: 'THREEDS_AUTHENTICATION_FAILED' });
|
77
|
-
}
|
78
|
-
});
|
79
|
-
});
|
80
|
-
}
|
81
|
-
}
|
82
|
-
});
|
83
|
-
}
|
84
|
-
|
85
|
-
var $paymentForm = $("#checkout_form_payment");
|
86
|
-
var $hostedFields = $("[data-braintree-hosted-fields]");
|
87
|
-
var $submitButton = $("input[type='submit']", $paymentForm);
|
88
|
-
|
89
|
-
// If we're not using hosted fields, the form doesn't need to wait.
|
90
|
-
if ($hostedFields.length > 0) {
|
91
|
-
disableSubmit();
|
92
|
-
|
93
|
-
var fieldPromises = $hostedFields.map(function(index, field) {
|
94
|
-
var $this = $(this);
|
95
|
-
var id = $this.data("id");
|
96
|
-
|
97
|
-
var braintreeForm = new SolidusPaypalBraintree.createHostedForm(id);
|
98
|
-
|
99
|
-
var formInitializationSuccess = function(formObject) {
|
100
|
-
addFormHook(formObject, field);
|
101
|
-
}
|
102
|
-
|
103
|
-
return braintreeForm.initialize().then(formInitializationSuccess, braintreeError);
|
104
|
-
});
|
105
|
-
|
106
|
-
$.when.apply($, fieldPromises).done(enableSubmit);
|
107
|
-
}
|
108
|
-
});
|