Mollie Payments for WooCommerce - Version 5.7.1

Version Description

  • 01-07-2020 =

  • Feature - Show selected credit card icons on checkout

  • Feature - Log information about API call data

  • Fix - Translate the string "Secure payments provided by"

  • Fix - Refund amount >1000 (by @NielsdeBlaauw)

Download this release

Release Info

Developer carmen222
Plugin Icon wp plugin Mollie Payments for WooCommerce
Version 5.7.1
Comparing to
See all releases

Code changes from version 5.6.1 to 5.7.1

Files changed (36) hide show
  1. inc/settings/mollie_creditcard_icons_selector.php +51 -0
  2. mollie-payments-for-woocommerce.php +1 -1
  3. public/images/Creditcard_issuers/amex-alt.png +0 -0
  4. public/images/Creditcard_issuers/amex-alt.svg +9 -0
  5. public/images/Creditcard_issuers/amex-alt@2x.png +0 -0
  6. public/images/Creditcard_issuers/amex.png +0 -0
  7. public/images/Creditcard_issuers/amex.svg +5 -0
  8. public/images/Creditcard_issuers/amex@2x.png +0 -0
  9. public/images/Creditcard_issuers/cartasi.png +0 -0
  10. public/images/Creditcard_issuers/cartasi.svg +1 -0
  11. public/images/Creditcard_issuers/cartasi@2x.png +0 -0
  12. public/images/Creditcard_issuers/cartebancaire.png +0 -0
  13. public/images/Creditcard_issuers/cartebancaire.svg +11 -0
  14. public/images/Creditcard_issuers/cartebancaire@2x.png +0 -0
  15. public/images/Creditcard_issuers/maestro.png +0 -0
  16. public/images/Creditcard_issuers/maestro.svg +6 -0
  17. public/images/Creditcard_issuers/maestro@2x.png +0 -0
  18. public/images/Creditcard_issuers/mastercard.png +0 -0
  19. public/images/Creditcard_issuers/mastercard.svg +6 -0
  20. public/images/Creditcard_issuers/mastercard@2x.png +0 -0
  21. public/images/Creditcard_issuers/visa.png +0 -0
  22. public/images/Creditcard_issuers/visa.svg +1 -0
  23. public/images/Creditcard_issuers/visa@2x.png +0 -0
  24. public/images/Creditcard_issuers/vpay.png +0 -0
  25. public/images/Creditcard_issuers/vpay.svg +1 -0
  26. public/images/Creditcard_issuers/vpay@2x.png +0 -0
  27. public/images/compositeCards.svg +11 -0
  28. readme.txt +8 -1
  29. src/Mollie/WC/Gateway/Abstract.php +33 -6
  30. src/Mollie/WC/Gateway/Creditcard.php +113 -0
  31. src/Mollie/WC/Helper/PaymentMethodsIconUrl.php +25 -3
  32. src/Mollie/WC/Payment/Order.php +3 -3
  33. src/Mollie/WC/Plugin.php +1 -1
  34. vendor/autoload.php +1 -1
  35. vendor/composer/autoload_real.php +7 -7
  36. vendor/composer/autoload_static.php +5 -5
inc/settings/mollie_creditcard_icons_selector.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ return [
4
+ [
5
+ 'title' => __( 'Customize Icons', 'mollie-payments-for-woocommerce' ),
6
+ 'type' => 'title',
7
+ 'desc' => '',
8
+ 'id' => 'customize_icons',
9
+ ],
10
+ 'mollie_creditcard_icons_enabler' => [
11
+ 'type' => 'checkbox',
12
+ 'title' => __('Enable Icons Selector', 'mollie-payments-for-woocommerce'),
13
+ 'description' => __(
14
+ 'Show customized creditcard icons on checkout page',
15
+ 'mollie-payments-for-woocommerce'
16
+ ),
17
+ 'checkboxgroup' => 'start',
18
+ 'default' => 'no',
19
+ ],
20
+ 'mollie_creditcard_icons_amex' => [
21
+ 'label' => __('Show American Express Icon', 'mollie-payments-for-woocommerce'),
22
+ 'type' => 'checkbox',
23
+ 'default' => 'no',
24
+ ],
25
+ 'mollie_creditcard_icons_cartasi' => [
26
+ 'label' => __('Show Carta Si Icon', 'mollie-payments-for-woocommerce'),
27
+ 'type' => 'checkbox',
28
+ 'default' => 'no',
29
+ ],
30
+ 'mollie_creditcard_icons_cartebancaire' => [
31
+ 'label' => __('Show Carte Bancaire Icon', 'mollie-payments-for-woocommerce'),
32
+ 'type' => 'checkbox',
33
+ 'default' => 'no',
34
+ ],
35
+ 'mollie_creditcard_icons_maestro' => [
36
+ 'label' => __('Show Maestro Icon', 'mollie-payments-for-woocommerce'),
37
+ 'type' => 'checkbox',
38
+ 'default' => 'no',
39
+ ],
40
+ 'mollie_creditcard_icons_visa' => [
41
+ 'label' => __('Show Visa Icon', 'mollie-payments-for-woocommerce'),
42
+ 'type' => 'checkbox',
43
+ 'default' => 'no',
44
+ ],
45
+ 'mollie_creditcard_icons_vpay' => [
46
+ 'label' => __('Show VPay Icon', 'mollie-payments-for-woocommerce'),
47
+ 'type' => 'checkbox',
48
+ 'checkboxgroup' => 'end',
49
+ 'default' => 'no',
50
+ ],
51
+ ];
mollie-payments-for-woocommerce.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Mollie Payments for WooCommerce
4
  * Plugin URI: https://www.mollie.com
5
  * Description: Accept payments in WooCommerce with the official Mollie plugin
6
- * Version: 5.6.1
7
  * Author: Mollie
8
  * Author URI: https://www.mollie.com
9
  * Requires at least: 3.8
3
  * Plugin Name: Mollie Payments for WooCommerce
4
  * Plugin URI: https://www.mollie.com
5
  * Description: Accept payments in WooCommerce with the official Mollie plugin
6
+ * Version: 5.7.1
7
  * Author: Mollie
8
  * Author URI: https://www.mollie.com
9
  * Requires at least: 3.8
public/images/Creditcard_issuers/amex-alt.png ADDED
Binary file
public/images/Creditcard_issuers/amex-alt.svg ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <svg width="32" height="24" viewBox="0 0 32 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M27.871 0H4.12903C1.84863 0 0 1.86872 0 4.17391V19.8261C0 22.1313 1.84863 24 4.12903 24H27.871C30.1514 24 32 22.1313 32 19.8261V4.17391C32 1.86872 30.1514 0 27.871 0Z" fill="#0095FF"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M18.3521 18.8585V11.2566L31.8821 11.2688V13.3686L30.3183 15.0398L31.8821 16.7263V18.8707H29.3853L28.0584 17.4065L26.7409 18.8763L18.3521 18.8585Z" fill="#FFFFFE"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M19.2557 18.0251V12.0932H24.2855V13.4597H20.8843V14.3873H24.2044V15.7311H20.8843V16.6422H24.2855V18.0251H19.2557Z" fill="#0095FF"/>
5
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M24.2604 18.0251L27.0435 15.0557L24.2603 12.0933H26.4144L28.1151 13.9734L29.8206 12.0933H31.8821V12.14L29.1583 15.0557L31.8821 17.9409V18.0251H29.7998L28.069 16.1261L26.356 18.0251H24.2604Z" fill="#0095FF"/>
6
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M18.9831 4.50928H22.2445L23.39 7.11041V4.50928H27.4165L28.1108 6.45804L28.8075 4.50928H31.8821V12.1111H15.6334L18.9831 4.50928Z" fill="#FFFFFE"/>
7
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M19.6006 5.3349L16.9686 11.2618H18.7738L19.2704 10.0749H21.961L22.4572 11.2618H24.3073L21.6862 5.3349H19.6006ZM19.8268 8.74481L20.6162 6.85805L21.4049 8.74481H19.8268Z" fill="#0095FF"/>
8
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M24.2827 11.261V5.3342L26.8201 5.34292L28.1258 8.98656L29.44 5.3342H31.8822V11.261L30.3107 11.2749V7.20375L28.8272 11.261H27.3928L25.8786 7.18984V11.261H24.2827Z" fill="#0095FF"/>
9
+ </svg>
public/images/Creditcard_issuers/amex-alt@2x.png ADDED
Binary file
public/images/Creditcard_issuers/amex.png ADDED
Binary file
public/images/Creditcard_issuers/amex.svg ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <svg width="32" height="24" viewBox="0 0 32 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M27.871 0H4.12903C1.84863 0 0 1.86872 0 4.17391V19.8261C0 22.1313 1.84863 24 4.12903 24H27.871C30.1514 24 32 22.1313 32 19.8261V4.17391C32 1.86872 30.1514 0 27.871 0Z" fill="#0095FF"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M2 9.44702L3.04961 7H4.86481L5.46048 8.37072V7H7.71694L8.07154 7.99072L8.41532 7H18.5445V7.49807C18.5445 7.49807 19.077 7 19.9521 7L23.2386 7.01149L23.824 8.36427V7H25.7123L26.232 7.77706V7H28.1377V11.396H26.232L25.734 10.6164V11.396H22.9596L22.6806 10.703H21.9348L21.6603 11.396H19.7788C19.0258 11.396 18.5445 10.9081 18.5445 10.9081V11.396H15.7077L15.1446 10.703V11.396H4.5959L4.31709 10.703H3.57363L3.29679 11.396H2V9.44702ZM3.42106 7.54192L2.00535 10.8335H2.92705L3.18826 10.1744H4.70683L4.96669 10.8335H5.90868L4.49434 7.54192H3.42106ZM3.94484 8.30797L4.40772 9.45975H3.48061L3.94484 8.30797ZM6.00627 7.54135V10.8329H6.82916V8.40755L7.70388 10.8329H8.42556L9.29784 8.40755V10.8329H10.1207V7.54135H8.82143L8.07786 9.66841L7.31605 7.54621L6.00627 7.54135ZM10.6837 10.8329V7.54135H13.3689V8.27762H11.5153V8.84065H13.3256V9.53362H11.5153V10.1183H13.3689V10.8329H10.6837ZM13.8453 10.8335V7.54192H15.6766C16.2833 7.54192 16.827 7.91713 16.827 8.60979C16.827 9.20192 16.3686 9.58331 15.9242 9.62081L17.007 10.8335H16.0014L15.0147 9.66412H14.6682V10.8335H13.8453ZM15.6089 8.27819H14.6682V8.97116H15.6211C15.786 8.97116 15.9987 8.84335 15.9987 8.62467C15.9987 8.4547 15.8345 8.27819 15.6089 8.27819ZM18.0031 10.8329H17.1629V7.54135H18.0031V10.8329ZM19.814 10.8329H19.9954L20.3418 10.114H20.1253C19.6012 10.114 19.2374 9.84624 19.2374 9.20879C19.2374 8.67199 19.5556 8.32093 20.0054 8.32093H20.9482V7.54135H20.0387C18.9305 7.54135 18.4037 8.23651 18.4037 9.20067C18.4037 10.1416 18.9365 10.8329 19.814 10.8329ZM21.786 7.54192L20.3703 10.8335H21.292L21.5532 10.1744H23.0718L23.3316 10.8335H24.2736L22.8593 7.54192H21.786ZM22.3098 8.30797L22.7727 9.45975H21.8455L22.3098 8.30797ZM24.3696 7.54135V10.8329H25.1925V8.71072L26.5622 10.8329H27.5746V7.54135H26.7517V9.60941L25.4158 7.54135H24.3696Z" fill="white"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M7.43542 12.7602V17.1562H12.0608L12.5671 16.4912L13.0657 17.1562H15.8593V16.1384H16.4873C17.0321 16.1384 17.2842 15.9733 17.2842 15.9733V17.1562H19.1292V16.4632L19.6922 17.1562H29.0472C29.5582 17.1518 30 16.853 30 16.853V15.9629C29.8655 16.3329 29.5346 16.5932 28.9964 16.5932H27.2426V15.8786H28.8894C29.1331 15.8786 29.2386 15.7469 29.2386 15.6025C29.2386 15.4641 29.1335 15.3242 28.8894 15.3242H28.1452C27.4984 15.3242 27.1381 14.9301 27.1381 14.3384C27.1381 13.8106 27.468 13.3016 28.4293 13.3016H30V12.7602H13.1052L12.5893 13.4112L12.09 12.7602H7.43542ZM30 13.3694L29.6853 14.0422H28.2993C28.0344 14.0422 27.9529 14.1812 27.9529 14.314C27.9529 14.4504 28.0536 14.6009 28.256 14.6009H29.0356C29.563 14.6009 29.872 14.8197 30 15.1467V13.3694ZM7.99834 13.3016V16.5932H10.6836V15.8786H8.8299V15.2939H10.6403V14.6009H8.8299V14.0379H10.6836V13.3016H7.99834ZM23.8413 16.5932H21.156V13.3016H23.8413V14.0379H21.9876V14.6009H23.7893V15.2939H21.9876V15.8786H23.8413V16.5932ZM12.0952 14.9677L10.7878 16.5932H11.8096L12.5649 15.5795L13.3389 16.5932H14.3755L13.0656 14.9474L14.3866 13.3016H13.3905L12.5906 14.3316L11.7934 13.3016H10.7567L12.0952 14.9677ZM14.4732 13.3022V16.5937H15.3178V15.5543H16.184C16.9169 15.5543 17.4725 15.1654 17.4725 14.4093C17.4725 13.7829 17.0368 13.3022 16.2909 13.3022H14.4732ZM15.3178 14.0465H16.23C16.4668 14.0465 16.636 14.1917 16.636 14.4255C16.636 14.6452 16.4676 14.8045 16.2273 14.8045H15.3178V14.0465ZM18.6527 16.5932H17.8298V13.3016H19.661C20.2678 13.3016 20.8115 13.6768 20.8115 14.3695C20.8115 14.9616 20.3531 15.343 19.9087 15.3805L20.9915 16.5932H19.9859L18.9992 15.4238H18.6527V16.5932ZM19.5934 14.0379H18.6527V14.7309H19.6056C19.7705 14.7309 19.9832 14.6031 19.9832 14.3844C19.9832 14.2144 19.819 14.0379 19.5934 14.0379ZM24.2223 16.5932V15.8786H25.8692C26.1129 15.8786 26.2184 15.7469 26.2184 15.6025C26.2184 15.4641 26.1132 15.3242 25.8692 15.3242H25.125C24.4781 15.3242 24.1179 14.9301 24.1179 14.3384C24.1179 13.8106 24.4478 13.3016 25.409 13.3016H27.0115L26.665 14.0422H25.2791C25.0142 14.0422 24.9326 14.1812 24.9326 14.314C24.9326 14.4504 25.0334 14.6009 25.2358 14.6009H26.0154C26.7365 14.6009 27.0494 15.01 27.0494 15.5456C27.0494 16.1215 26.7007 16.5932 25.9761 16.5932H24.2223Z" fill="white"/>
5
+ </svg>
public/images/Creditcard_issuers/amex@2x.png ADDED
Binary file
public/images/Creditcard_issuers/cartasi.png ADDED
Binary file
public/images/Creditcard_issuers/cartasi.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg fill="none" height="24" viewBox="0 0 32 24" width="32" xmlns="http://www.w3.org/2000/svg"><g clip-rule="evenodd" fill-rule="evenodd"><path d="m4 0h24c2.2091 0 4 1.79086 4 4v16c0 2.2091-1.7909 4-4 4h-24c-2.20914 0-4-1.7909-4-4v-16c0-2.20914 1.79086-4 4-4z" fill="#ff6e28"/><path d="m5.39708.0876698c.21301-.0599205.43464-.0876698.65552-.0876698h.01549c.28676.00173033.55551.0506922.78753.134965.18744.068124.35081.159383.48049.267496.05398.044924.10418.095488.14826.150666.03225.04031.06116.083056.08579.128044.06688.122213.10158.260062.08389.406119-.01367.1124-.05662.21968-.12401.3187-.05127.07523-.11658.14579-.19393.21026-.0609.05076-.12917.0978-.20393.14048-.28424.16002-.65968.25737-1.07127.25737-.88697 0-1.60604-.45194-1.60604-1.00936 0-.29505.20142-.560495.5225-.745063.03011-.017111.06128-.033453.0934-.04909.10008-.048641.20948-.090041.32631-.1229172zm-5.176563 6.0324902c0-2.24853 3.925363-3.01198 5.920323-3.01198 1.12826 0 3.51906.24244 4.96736 1.50679.1867.16701.357.35151.5062.55524.0395.05384.0774.10901.1137.16554.0874.13592.1658.27973.2338.432.06.13439.0439.2318-.012.28474-.009.00852-.019.01589-.0299.02211-.0239.01358-.0521.02147-.0829.02339-.0907.00545-.1725-.03563-.2406-.09363-.0134-.01365-.0265-.02839-.0393-.04435-.0651-.08158-.1429-.16111-.232-.23834-.7405-.67034-2.32831-1.16771-3.78307-1.23269-1.58507-.07082-3.01212.37176-3.01212 1.66335v1.66618c0 .08055-.00246.1556-.00743.22532-.03301.46348-.17661.69534-.44592.78666-.12552.04262-.27832.05467-.45989.0455-.49315-.02512-1.74839-.2673-2.59632-.99987-.00195-.00166-.0039-.00333-.00579-.005-.462794-.41566-.794143-.98378-.794143-1.75096zm7.463763-.47097c.13182-.14605.3265-.20187.58964-.20187.0352 0 .07155.00096.10921.00288.77506.03948 3.43267.6151 3.43267 2.78782 0 2.24848-3.92544 3.01198-5.9204 3.01198-1.4171 0-4.82576-.3825-5.8572789-2.69162-.1575181-.35247.2092899-.4502.4408119-.16021 1.059677 1.32696 5.494877 2.12923 6.692037.65746.00523-.00603.01046-.01224.01562-.01833.03905-.04678.07483-.09587.10701-.14734.13056-.20879.20312-.45687.20312-.74814v-1.66617c0-.39952.06046-.6624.18756-.82646z" fill="#fff" transform="translate(10 6)"/></g></svg>
public/images/Creditcard_issuers/cartasi@2x.png ADDED
Binary file
public/images/Creditcard_issuers/cartebancaire.png ADDED
Binary file
public/images/Creditcard_issuers/cartebancaire.svg ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg width="32" height="24" viewBox="0 0 32 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M28 0H4C1.79086 0 0 1.79086 0 4V20C0 22.2091 1.79086 24 4 24H28C30.2091 24 32 22.2091 32 20V4C32 1.79086 30.2091 0 28 0Z" fill="url(#paint0_linear)"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M18 1.81316C18 2.81326 17.1992 3.62435 16.2107 3.62608V3.62804H9.68951V0H16.2107V0.00034523C17.1992 0.00195682 18 0.813048 18 1.81316ZM18 5.66094C18 6.66128 17.1992 7.47214 16.2107 7.47375V7.47606H9.68951V3.8479H16.2107V3.84813C17.1992 3.84986 18 4.66084 18 5.66094ZM4.77579 3.8479H9.56399V4.20188C9.56399 6.02332 8.1044 7.5 6.30365 7.5H3.26068C1.45992 7.5 0 6.02332 0 4.20188V3.3223C0 1.50074 1.45992 0.0241737 3.26068 0.0241737H6.30365C8.1044 0.0241737 9.56399 1.50074 9.56399 3.3223V3.62804H4.77579V3.8479Z" transform="translate(7 8.25)" fill="white"/>
4
+ <defs>
5
+ <linearGradient id="paint0_linear" x2="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(48 12) scale(45.2548 33.9411) rotate(135)">
6
+ <stop stop-color="#083969"/>
7
+ <stop offset="0.491699" stop-color="#007B9D"/>
8
+ <stop offset="1" stop-color="#00A84A"/>
9
+ </linearGradient>
10
+ </defs>
11
+ </svg>
public/images/Creditcard_issuers/cartebancaire@2x.png ADDED
Binary file
public/images/Creditcard_issuers/maestro.png ADDED
Binary file
public/images/Creditcard_issuers/maestro.svg ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <svg width="32" height="24" viewBox="0 0 32 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M4.12903 0.5H27.871C29.8701 0.5 31.5 2.13976 31.5 4.17391V19.8261C31.5 21.8602 29.8701 23.5 27.871 23.5H4.12903C2.12986 23.5 0.5 21.8602 0.5 19.8261V4.17391C0.5 2.13976 2.12986 0.5 4.12903 0.5Z" fill="white" stroke="#E6E6E6"/>
3
+ <path d="M5.16129 10.4348C8.01179 10.4348 10.3226 8.09888 10.3226 5.21739C10.3226 2.33591 8.01179 0 5.16129 0C2.31079 0 0 2.33591 0 5.21739C0 8.09888 2.31079 10.4348 5.16129 10.4348Z" transform="translate(7.74194 6.78259)" fill="#E7001A"/>
4
+ <path d="M5.16129 10.4348C8.01179 10.4348 10.3226 8.09888 10.3226 5.21739C10.3226 2.33591 8.01179 0 5.16129 0C2.31079 0 0 2.33591 0 5.21739C0 8.09888 2.31079 10.4348 5.16129 10.4348Z" transform="translate(13.9355 6.78259)" fill="#00A2E1"/>
5
+ <path opacity="0.3" fill-rule="evenodd" clip-rule="evenodd" d="M2.06452 0C3.31814 0.951867 4.12903 2.46735 4.12903 4.17429C4.12903 5.88124 3.31814 7.39672 2.06452 8.34859C0.810894 7.39672 0 5.88124 0 4.17429C0 2.46735 0.810894 0.951867 2.06452 0Z" transform="translate(13.9355 7.82568)" fill="#E7001A"/>
6
+ </svg>
public/images/Creditcard_issuers/maestro@2x.png ADDED
Binary file
public/images/Creditcard_issuers/mastercard.png ADDED
Binary file
public/images/Creditcard_issuers/mastercard.svg ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <svg width="32" height="24" viewBox="0 0 32 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M4.12903 0.5H27.871C29.8701 0.5 31.5 2.13976 31.5 4.17391V19.8261C31.5 21.8602 29.8701 23.5 27.871 23.5H4.12903C2.12986 23.5 0.5 21.8602 0.5 19.8261V4.17391C0.5 2.13976 2.12986 0.5 4.12903 0.5Z" fill="white" stroke="#E6E6E6"/>
3
+ <path d="M5.16129 10.4348C8.01179 10.4348 10.3226 8.09888 10.3226 5.21739C10.3226 2.33591 8.01179 0 5.16129 0C2.31079 0 0 2.33591 0 5.21739C0 8.09888 2.31079 10.4348 5.16129 10.4348Z" transform="translate(7.74194 6.78259)" fill="#E7001A"/>
4
+ <path d="M5.16129 10.4348C8.01179 10.4348 10.3226 8.09888 10.3226 5.21739C10.3226 2.33591 8.01179 0 5.16129 0C2.31079 0 0 2.33591 0 5.21739C0 8.09888 2.31079 10.4348 5.16129 10.4348Z" transform="translate(13.9355 6.78259)" fill="#F49B1C"/>
5
+ <path opacity="0.3" fill-rule="evenodd" clip-rule="evenodd" d="M2.06452 0C3.31814 0.951867 4.12903 2.46735 4.12903 4.17429C4.12903 5.88124 3.31814 7.39672 2.06452 8.34859C0.810894 7.39672 0 5.88124 0 4.17429C0 2.46735 0.810894 0.951867 2.06452 0Z" transform="translate(13.9355 7.82568)" fill="#E7001A"/>
6
+ </svg>
public/images/Creditcard_issuers/mastercard@2x.png ADDED
Binary file
public/images/Creditcard_issuers/visa.png ADDED
Binary file
public/images/Creditcard_issuers/visa.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg fill="none" height="24" viewBox="0 0 32 24" width="32" xmlns="http://www.w3.org/2000/svg"><path d="m28 0h-24c-2.20914 0-4 1.79086-4 4v16c0 2.2091 1.79086 4 4 4h24c2.2091 0 4-1.7909 4-4v-16c0-2.20914-1.7909-4-4-4z" fill="#27337a"/><path d="m9.30917 4.08183c-.01027-.83578.72153-1.30221 1.27293-1.5795.5664-.28455.7567-.46699.7545-.72141-.0043-.38944-.4518-.56128-.8707-.56798-.73081-.01171-1.15565.20365-1.49347.36656l-.26322-1.271521c.3389-.161243.96642-.30184175 1.61719-.307979 1.5275 0 2.5269.778315 2.5323 1.98512.0059 1.53152-2.0523 1.61633-2.0383 2.30091.0049.20755.1968.42905.6173.4854.2081.02846.7826.05022 1.434-.25943l.2556 1.23024c-.3502.13167-.8005.25776-1.361.25776-1.4377 0-2.44902-.78892-2.45713-1.91817zm6.27473 1.81216c-.2789 0-.514-.16793-.6189-.4257l-2.182-5.3779046h1.5264l.3038.8664676h1.8653l.1762-.8664676h1.3453l-1.174 5.8036046zm.2135-1.56779.4405-2.17928h-1.2064zm-8.33893 1.56779-1.20317-5.8036046h1.45451l1.20263 5.8036046zm-2.15176 0-1.51396-3.95015-.6124 3.35874c-.07189.37494-.35566.59141-.67077.59141h-2.4749874l-.0345926-.16849c.508078-.11382 1.08534-.29738 1.43505-.49377.21404-.11996.27512-.22485.34538-.50995l1.15993-4.6313946h1.53721l2.35661 5.8036046z" fill="#fff" transform="matrix(1 0 0 -1 7 15)"/></svg>
public/images/Creditcard_issuers/visa@2x.png ADDED
Binary file
public/images/Creditcard_issuers/vpay.png ADDED
Binary file
public/images/Creditcard_issuers/vpay.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg fill="none" height="24" viewBox="0 0 32 24" width="32" xmlns="http://www.w3.org/2000/svg"><path d="m28 0h-24c-2.20914 0-4 1.79086-4 4v16c0 2.2091 1.79086 4 4 4h24c2.2091 0 4-1.7909 4-4v-16c0-2.20914-1.7909-4-4-4z" fill="#27337a"/><g clip-rule="evenodd" fill="#fff" fill-rule="evenodd"><path d="m.582423 2.50564v1.99436h-.582423v-4.5h1.13374c.90372 0 1.44882.468992 1.44882 1.23723 0 .84763-.6192 1.26841-1.54874 1.26841zm.519767-1.963806h-.519767v1.464636h.481967c.5834 0 .92958-.23429.92958-.75021 0-.474591-.30891-.714426-.89178-.714426zm4.7306 3.958166-.50162-1.55569h-1.76346l-.48343 1.55569h-.58912l1.67214-4.5h.58243l1.6468 4.38002zm-1.38621-3.80299-.68186 1.74855h1.369zm3.70251 3.80299h-.58189v-1.95858l-1.51103-2.421266.58242-.120154 1.22506 2.02507 1.19492-2.02507h.6441l-1.55358 2.54142z" transform="translate(11.5 15.75)"/><path d="m7.59239 8-2.16605-5.44511-.87616 4.62988c-.10285.51683-.50884.81523-.95968.81523h-3.5410081l-.0494919-.23226c.726915-.1569 1.55281-.40992 2.05315-.68064.30623-.16535.39361-.30994.49415-.70294l1.65953-6.38416h2.1993l3.37165 8z" transform="matrix(1 0 0 -1 11 13)"/></g></svg>
public/images/Creditcard_issuers/vpay@2x.png ADDED
Binary file
public/images/compositeCards.svg ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg width="75" height="24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><svg x="0" width="32" height="25" viewBox="0 0 32 25" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M28 0H4C1.79086 0 0 1.79086 0 4V20C0 22.2091 1.79086 24 4 24H28C30.2091 24 32 22.2091 32 20V4C32 1.79086 30.2091 0 28 0Z" transform="translate(0 0.5)" fill="#27337A"/>
3
+ <path d="M9.30917 4.08183C9.2989 3.24605 10.0307 2.77962 10.5821 2.50233C11.1485 2.21778 11.3388 2.03534 11.3366 1.78092C11.3323 1.39148 10.8848 1.21964 10.4659 1.21294C9.73509 1.20123 9.31025 1.41659 8.97243 1.5795L8.70921 0.307979C9.04811 0.146736 9.67563 0.00613725 10.3264 0C11.8539 0 12.8533 0.778315 12.8587 1.98512C12.8646 3.51664 10.8064 3.60145 10.8204 4.28603C10.8253 4.49358 11.0172 4.71508 11.4377 4.77143C11.6458 4.79989 12.2203 4.82165 12.8717 4.512L13.1273 5.74224C12.7771 5.87391 12.3268 6 11.7663 6C10.3286 6 9.31728 5.21108 9.30917 4.08183ZM15.5839 5.89399C15.305 5.89399 15.0699 5.72606 14.965 5.46829L12.783 0.0903854H14.3094L14.6132 0.956853H16.4785L16.6547 0.0903854H18L16.826 5.89399H15.5839ZM15.7974 4.3262L16.2379 2.14692H15.0315L15.7974 4.3262ZM7.45847 5.89399L6.2553 0.0903854H7.70981L8.91244 5.89399H7.45847ZM5.30671 5.89399L3.79275 1.94384L3.18035 5.30258C3.10846 5.67751 2.82469 5.89399 2.50958 5.89399H0.0345926L0 5.7255C0.508078 5.61168 1.08534 5.42812 1.43505 5.23173C1.64909 5.11177 1.71017 5.00688 1.78043 4.72178L2.94036 0.0903854H4.47757L6.83418 5.89399H5.30671Z" transform="translate(7 15.5) scale(1 -1)" fill="white"/>
4
+ </svg>
5
+ <svg x="33" width="33" height="24" viewBox="0 0 33 24" fill="none" xmlns="http://www.w3.org/2000/svg">
6
+ <path d="M4.12903 0.5H27.871C29.8701 0.5 31.5 2.13976 31.5 4.17391V19.8261C31.5 21.8602 29.8701 23.5 27.871 23.5H4.12903C2.12986 23.5 0.5 21.8602 0.5 19.8261V4.17391C0.5 2.13976 2.12986 0.5 4.12903 0.5Z" transform="translate(0.5)" fill="white" stroke="#E5E5E5"/>
7
+ <path d="M5.16129 10.4348C8.01179 10.4348 10.3226 8.09888 10.3226 5.21739C10.3226 2.33591 8.01179 0 5.16129 0C2.31079 0 0 2.33591 0 5.21739C0 8.09888 2.31079 10.4348 5.16129 10.4348Z" transform="translate(8.24194 6.78259)" fill="#E7001A"/>
8
+ <path d="M5.16129 10.4348C8.01179 10.4348 10.3226 8.09888 10.3226 5.21739C10.3226 2.33591 8.01179 0 5.16129 0C2.31079 0 0 2.33591 0 5.21739C0 8.09888 2.31079 10.4348 5.16129 10.4348Z" transform="translate(14.4355 6.78259)" fill="#00A2E1"/>
9
+ <path opacity="0.3" fill-rule="evenodd" clip-rule="evenodd" d="M2.06452 0C3.31814 0.951867 4.12903 2.46735 4.12903 4.17429C4.12903 5.88124 3.31814 7.39672 2.06452 8.34859C0.810894 7.39672 0 5.88124 0 4.17429C0 2.46735 0.810894 0.951867 2.06452 0Z" transform="translate(14.4355 7.82568)" fill="#E7001A"/>
10
+ </svg>
11
+ </svg>
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: daanvm, danielhuesken, davdebcom, dinamiko, inpsyde, l.vangunst, n
3
  Tags: mollie, payments, payment gateway, woocommerce, credit card, ideal, bancontact, klarna, sofort, giropay, woocommerce subscriptions
4
  Requires at least: 3.8
5
  Tested up to: 5.3
6
- Stable tag: 5.6.1
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -181,6 +181,13 @@ Automatic updates should work like a charm; as always though, ensure you backup
181
 
182
  == Changelog ==
183
 
 
 
 
 
 
 
 
184
  = 5.6.1 - 27-05-2020 =
185
 
186
  * Feature - Translations of Plugin FR/DE/NL/EN/ES
3
  Tags: mollie, payments, payment gateway, woocommerce, credit card, ideal, bancontact, klarna, sofort, giropay, woocommerce subscriptions
4
  Requires at least: 3.8
5
  Tested up to: 5.3
6
+ Stable tag: 5.7.1
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
181
 
182
  == Changelog ==
183
 
184
+ = 5.7.1 - 01-07-2020 =
185
+
186
+ * Feature - Show selected credit card icons on checkout
187
+ * Feature - Log information about API call data
188
+ * Fix - Translate the string "Secure payments provided by"
189
+ * Fix - Refund amount >1000€ (by @NielsdeBlaauw)
190
+
191
  = 5.6.1 - 27-05-2020 =
192
 
193
  * Feature - Translations of Plugin FR/DE/NL/EN/ES
src/Mollie/WC/Gateway/Abstract.php CHANGED
@@ -548,7 +548,18 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
548
  Mollie_WC_Plugin::debug( 'Creating payment object: type Order, first try creating a Mollie Order.' );
549
 
550
  // Only enable this for hardcore debugging!
551
- // Mollie_WC_Plugin::debug( $data );
 
 
 
 
 
 
 
 
 
 
 
552
 
553
  $payment_object = Mollie_WC_Plugin::getApiHelper()->getApiClient( $test_mode )->orders->create( $data );
554
  }
@@ -605,7 +616,18 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
605
  try {
606
 
607
  // Only enable this for hardcore debugging!
608
- // Mollie_WC_Plugin::debug( $data );
 
 
 
 
 
 
 
 
 
 
 
609
 
610
  // Try as simple payment
611
  $payment_object = Mollie_WC_Plugin::getApiHelper()->getApiClient( $test_mode )->payments->create( $data );
@@ -2165,10 +2187,15 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
2165
  <div class="mollie-components"></div>
2166
  <p class="mollie-components-description">
2167
  <?php
2168
- echo $this->lockIcon();
2169
- esc_html_e('Secure payments provided by ');
2170
- // TODO Check if possible to make svg accessible so we can show `mollie` text
2171
- echo $this->mollieLogo();
 
 
 
 
 
2172
  ?>
2173
  </p>
2174
  <?php
548
  Mollie_WC_Plugin::debug( 'Creating payment object: type Order, first try creating a Mollie Order.' );
549
 
550
  // Only enable this for hardcore debugging!
551
+ $apiCallLog = [
552
+ 'amount'=>isset($data['amount'])?$data['amount']:'',
553
+ 'redirectUrl'=>isset($data['redirectUrl'])?$data['redirectUrl']:'',
554
+ 'webhookUrl'=>isset($data['webhookUrl'])?$data['webhookUrl']:'',
555
+ 'method'=>isset($data['method'])?$data['method']:'',
556
+ 'payment'=>isset($data['payment'])?$data['payment']:'',
557
+ 'locale'=>isset($data['locale'])?$data['locale']:'',
558
+ 'metadata'=>isset($data['metadata'])?$data['metadata']:'',
559
+ 'orderNumber'=>isset($data['orderNumber'])?$data['orderNumber']:''
560
+ ];
561
+
562
+ Mollie_WC_Plugin::debug( $apiCallLog );
563
 
564
  $payment_object = Mollie_WC_Plugin::getApiHelper()->getApiClient( $test_mode )->orders->create( $data );
565
  }
616
  try {
617
 
618
  // Only enable this for hardcore debugging!
619
+ $apiCallLog = [
620
+ 'amount'=>isset($data['amount'])?$data['amount']:'',
621
+ 'description'=>isset($data['description'])?$data['description']:'',
622
+ 'redirectUrl'=>isset($data['redirectUrl'])?$data['redirectUrl']:'',
623
+ 'webhookUrl'=>isset($data['webhookUrl'])?$data['webhookUrl']:'',
624
+ 'method'=>isset($data['method'])?$data['method']:'',
625
+ 'issuer'=>isset($data['issuer'])?$data['issuer']:'',
626
+ 'locale'=>isset($data['locale'])?$data['locale']:'',
627
+ 'metadata'=>isset($data['metadata'])?$data['metadata']:''
628
+ ];
629
+
630
+ Mollie_WC_Plugin::debug( $apiCallLog );
631
 
632
  // Try as simple payment
633
  $payment_object = Mollie_WC_Plugin::getApiHelper()->getApiClient( $test_mode )->payments->create( $data );
2187
  <div class="mollie-components"></div>
2188
  <p class="mollie-components-description">
2189
  <?php
2190
+ printf(
2191
+ esc_html_x(
2192
+ '%1$s Secure payments provided by %2$s',
2193
+ 'Placeholder 1: lock icon, Placeholder 2: mollie logo',
2194
+ 'mollie-payments-for-woocommerce'
2195
+ ),
2196
+ $this->lockIcon(),
2197
+ $this->mollieLogo()
2198
+ );
2199
  ?>
2200
  </p>
2201
  <?php
src/Mollie/WC/Gateway/Creditcard.php CHANGED
@@ -18,6 +18,20 @@ class Mollie_WC_Gateway_Creditcard extends Mollie_WC_Gateway_AbstractSubscriptio
18
  $this->hasFieldsIfMollieComponentsIsEnabled();
19
  }
20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  /**
22
  * @inheritDoc
23
  */
@@ -42,6 +56,7 @@ class Mollie_WC_Gateway_Creditcard extends Mollie_WC_Gateway_AbstractSubscriptio
42
  parent::init_form_fields();
43
 
44
  $this->includeMollieComponentsFields();
 
45
  }
46
 
47
  /**
@@ -90,4 +105,102 @@ class Mollie_WC_Gateway_Creditcard extends Mollie_WC_Gateway_AbstractSubscriptio
90
  return parent::getInstructions($order, $payment, $admin_instructions, $plain_text);
91
  }
92
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  }
18
  $this->hasFieldsIfMollieComponentsIsEnabled();
19
  }
20
 
21
+ public function get_icon() {
22
+ $output = $this->icon ? '<img src="' . WC_HTTPS::force_https_url(
23
+ $this->icon
24
+ ) . '" alt="' . esc_attr($this->get_title()) . '" />' : '';
25
+
26
+ if ($this->enabledCreditcards()
27
+ && !is_admin()
28
+ ) {
29
+ $output = $this->buildSvgComposed() ?: '';
30
+ }
31
+
32
+ return apply_filters( 'woocommerce_gateway_icon', $output, $this->id );
33
+ }
34
+
35
  /**
36
  * @inheritDoc
37
  */
56
  parent::init_form_fields();
57
 
58
  $this->includeMollieComponentsFields();
59
+ $this->includeCreditCardIconSelector();
60
  }
61
 
62
  /**
105
  return parent::getInstructions($order, $payment, $admin_instructions, $plain_text);
106
  }
107
 
108
+ /**
109
+ * Include the credit card icon selector customization in the credit card
110
+ * settings page
111
+ */
112
+ protected function includeCreditCardIconSelector()
113
+ {
114
+ $fields = include Mollie_WC_Plugin::getPluginPath(
115
+ '/inc/settings/mollie_creditcard_icons_selector.php'
116
+ );
117
+
118
+ $fields and $this->form_fields = array_merge($this->form_fields, $fields);
119
+ }
120
+
121
+ /**
122
+ * @return array Array containing the credit cards names enabled in settings
123
+ * to make customization of checkout icons
124
+ */
125
+ protected function enabledCreditcards()
126
+ {
127
+ $optionLexem = Mollie_WC_Helper_PaymentMethodsIconUrl::MOLLIE_CREDITCARD_ICONS;
128
+ $creditcardsAvailable = Mollie_WC_Helper_PaymentMethodsIconUrl::AVAILABLE_CREDITCARD_ICONS;
129
+ $svgFileName = Mollie_WC_Helper_PaymentMethodsIconUrl::SVG_FILE_EXTENSION;
130
+ $iconEnabledOption = Mollie_WC_Helper_PaymentMethodsIconUrl::MOLLIE_CREDITCARD_ICONS_ENABLER;
131
+ $creditCardSettings = get_option('mollie_wc_gateway_creditcard_settings', false) ?: [];
132
+ $enabled = isset($creditCardSettings[$iconEnabledOption])
133
+ ? wc_string_to_bool($creditCardSettings[$iconEnabledOption])
134
+ : false;
135
+
136
+ if (!$enabled) {
137
+ return [];
138
+ }
139
+
140
+ $enabledCreditcards = [];
141
+
142
+ $creditcardSettings = get_option('mollie_wc_gateway_creditcard_settings', []) ?: [];
143
+ foreach ($creditcardsAvailable as $card) {
144
+ if (wc_string_to_bool($creditcardSettings[$optionLexem . $card])) {
145
+ $enabledCreditcards[] = $card . $svgFileName;
146
+ }
147
+ }
148
+
149
+ return $enabledCreditcards;
150
+ }
151
+
152
+ /**
153
+ *
154
+ * @return string Newly composed svg string
155
+ */
156
+ public function buildSvgComposed()
157
+ {
158
+ $enabledCreditCards = $this->enabledCreditcards();
159
+
160
+ $assetsImagesPath
161
+ = Mollie_WC_Plugin::getPluginPath('public/images/Creditcard_issuers/');
162
+ $cardWidth = Mollie_WC_Helper_PaymentMethodsIconUrl::CREDIT_CARD_ICON_WIDTH;
163
+ $cardsNumber = count($enabledCreditCards);
164
+ $cardsWidth = $cardWidth * $cardsNumber;
165
+ $cardPositionX = 0;
166
+ $actual = get_transient('svg_creditcards_string');
167
+ if(!$actual){
168
+ $actual
169
+ = "<svg width=\"{$cardsWidth}\" height=\"24\" style=\"float:right\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">";
170
+ foreach ($enabledCreditCards as $creditCard) {
171
+ $svgString = file_get_contents(
172
+ $assetsImagesPath . $creditCard
173
+ );
174
+ if ($svgString) {
175
+ $actual .= $this->positionSvgOnX(
176
+ $cardPositionX,
177
+ $svgString
178
+ );
179
+ $cardPositionX += $cardWidth;
180
+ }
181
+ }
182
+ $actual .= "</svg>";
183
+ set_transient( 'svg_creditcards_string', $actual, DAY_IN_SECONDS );
184
+ }
185
+
186
+
187
+ return $actual;
188
+ }
189
+
190
+ /**
191
+ * Method to add the x parameter to the svg string so that the icon can
192
+ * be positioned related to other icons.
193
+ *
194
+ * @param int $xPosition coordinate to position icon on x axis
195
+ * @param string $svgString svg string to add position to
196
+ *
197
+ * @return string|string[] Modified svg string with the x position added
198
+ */
199
+ protected function positionSvgOnX($xPosition, $svgString)
200
+ {
201
+ $positionString = " x=\"{$xPosition}\"";
202
+ $positionAfterSvgWord = 4;
203
+
204
+ return substr_replace($svgString, $positionString, $positionAfterSvgWord, 0);
205
+ }
206
  }
src/Mollie/WC/Helper/PaymentMethodsIconUrl.php CHANGED
@@ -4,6 +4,19 @@ use Mollie\Api\Types\PaymentMethod;
4
 
5
  class Mollie_WC_Helper_PaymentMethodsIconUrl
6
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  /**
8
  * @var array
9
  */
@@ -19,7 +32,12 @@ class Mollie_WC_Helper_PaymentMethodsIconUrl
19
  }
20
 
21
  /**
 
 
 
 
22
  * @param string $paymentMethodName
 
23
  * @return mixed
24
  */
25
  public function svgUrlForPaymentMethod($paymentMethodName)
@@ -35,11 +53,15 @@ class Mollie_WC_Helper_PaymentMethodsIconUrl
35
  */
36
  protected function fallToAssets($paymentMethodName)
37
  {
38
- if ( $paymentMethodName == PaymentMethod::CREDITCARD && !is_admin()) {
39
- return Mollie_WC_Plugin::getPluginUrl('public/images/' . $paymentMethodName . 's.svg');
 
 
40
  }
41
 
42
- return Mollie_WC_Plugin::getPluginUrl('public/images/' . $paymentMethodName . '.svg');
 
 
43
  }
44
  }
45
 
4
 
5
  class Mollie_WC_Helper_PaymentMethodsIconUrl
6
  {
7
+ const MOLLIE_CREDITCARD_ICONS = 'mollie_creditcard_icons_';
8
+ const AVAILABLE_CREDITCARD_ICONS = [
9
+ 'amex',
10
+ 'cartasi',
11
+ 'cartebancaire',
12
+ 'maestro',
13
+ 'mastercard',
14
+ 'visa',
15
+ 'vpay'
16
+ ];
17
+ const SVG_FILE_EXTENSION = '.svg';
18
+ const CREDIT_CARD_ICON_WIDTH = 33;
19
+ const MOLLIE_CREDITCARD_ICONS_ENABLER = 'mollie_creditcard_icons_enabler';
20
  /**
21
  * @var array
22
  */
32
  }
33
 
34
  /**
35
+ * Method that returns the url to the svg icon url
36
+ * In case of credit cards, if the settings is enabled, the svg has to be
37
+ * composed
38
+ *
39
  * @param string $paymentMethodName
40
+ *
41
  * @return mixed
42
  */
43
  public function svgUrlForPaymentMethod($paymentMethodName)
53
  */
54
  protected function fallToAssets($paymentMethodName)
55
  {
56
+ if ($paymentMethodName == PaymentMethod::CREDITCARD && !is_admin()) {
57
+ return Mollie_WC_Plugin::getPluginUrl(
58
+ "public/images/{$paymentMethodName}s.svg"
59
+ );
60
  }
61
 
62
+ return Mollie_WC_Plugin::getPluginUrl(
63
+ "public/images/{$paymentMethodName}" . self::SVG_FILE_EXTENSION
64
+ );
65
  }
66
  }
67
 
src/Mollie/WC/Payment/Order.php CHANGED
@@ -794,10 +794,10 @@ class Mollie_WC_Payment_Order extends Mollie_WC_Payment_Object {
794
  $totals += $item_data->get_total() + $item_data->get_total_tax();
795
  }
796
 
797
- $totals = number_format(abs($totals), 2); // WooCommerce - sum of all refund items
798
- $amount = number_format($amount, 2); // WooCommerce - refund amount
799
 
800
- if ($amount !== $totals) {
801
  $error_message = "The sum of refunds for all order lines is not identical to the refund amount, so this refund will be processed as a payment amount refund, not an order line refund.";
802
  $order->add_order_note($error_message);
803
  Mollie_WC_Plugin::debug(__METHOD__ . ' - ' . $error_message);
794
  $totals += $item_data->get_total() + $item_data->get_total_tax();
795
  }
796
 
797
+ $totals = number_format(abs($totals), 2); // WooCommerce - sum of all refund items
798
+ $check_amount = number_format($amount, 2); // WooCommerce - refund amount
799
 
800
+ if ($check_amount !== $totals) {
801
  $error_message = "The sum of refunds for all order lines is not identical to the refund amount, so this refund will be processed as a payment amount refund, not an order line refund.";
802
  $order->add_order_note($error_message);
803
  Mollie_WC_Plugin::debug(__METHOD__ . ' - ' . $error_message);
src/Mollie/WC/Plugin.php CHANGED
@@ -8,7 +8,7 @@ class Mollie_WC_Plugin
8
  {
9
  const PLUGIN_ID = 'mollie-payments-for-woocommerce';
10
  const PLUGIN_TITLE = 'Mollie Payments for WooCommerce';
11
- const PLUGIN_VERSION = '5.6.1';
12
 
13
  const DB_VERSION = '1.0';
14
  const DB_VERSION_PARAM_NAME = 'mollie-db-version';
8
  {
9
  const PLUGIN_ID = 'mollie-payments-for-woocommerce';
10
  const PLUGIN_TITLE = 'Mollie Payments for WooCommerce';
11
+ const PLUGIN_VERSION = '5.7.1';
12
 
13
  const DB_VERSION = '1.0';
14
  const DB_VERSION_PARAM_NAME = 'mollie-db-version';
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit5b6b3426f3ac06cdb1437d30239b7891::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit704c776347bd87cd071dc65cc05a5bb2::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit5b6b3426f3ac06cdb1437d30239b7891
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit5b6b3426f3ac06cdb1437d30239b7891
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit5b6b3426f3ac06cdb1437d30239b7891', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit5b6b3426f3ac06cdb1437d30239b7891', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit5b6b3426f3ac06cdb1437d30239b7891::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit5b6b3426f3ac06cdb1437d30239b7891
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInit5b6b3426f3ac06cdb1437d30239b7891::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequire5b6b3426f3ac06cdb1437d30239b7891($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequire5b6b3426f3ac06cdb1437d30239b7891($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit704c776347bd87cd071dc65cc05a5bb2
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit704c776347bd87cd071dc65cc05a5bb2', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit704c776347bd87cd071dc65cc05a5bb2', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit704c776347bd87cd071dc65cc05a5bb2::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInit704c776347bd87cd071dc65cc05a5bb2::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequire704c776347bd87cd071dc65cc05a5bb2($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequire704c776347bd87cd071dc65cc05a5bb2($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit5b6b3426f3ac06cdb1437d30239b7891
8
  {
9
  public static $files = array (
10
  '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
@@ -287,10 +287,10 @@ class ComposerStaticInit5b6b3426f3ac06cdb1437d30239b7891
287
  public static function getInitializer(ClassLoader $loader)
288
  {
289
  return \Closure::bind(function () use ($loader) {
290
- $loader->prefixLengthsPsr4 = ComposerStaticInit5b6b3426f3ac06cdb1437d30239b7891::$prefixLengthsPsr4;
291
- $loader->prefixDirsPsr4 = ComposerStaticInit5b6b3426f3ac06cdb1437d30239b7891::$prefixDirsPsr4;
292
- $loader->prefixesPsr0 = ComposerStaticInit5b6b3426f3ac06cdb1437d30239b7891::$prefixesPsr0;
293
- $loader->classMap = ComposerStaticInit5b6b3426f3ac06cdb1437d30239b7891::$classMap;
294
 
295
  }, null, ClassLoader::class);
296
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit704c776347bd87cd071dc65cc05a5bb2
8
  {
9
  public static $files = array (
10
  '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
287
  public static function getInitializer(ClassLoader $loader)
288
  {
289
  return \Closure::bind(function () use ($loader) {
290
+ $loader->prefixLengthsPsr4 = ComposerStaticInit704c776347bd87cd071dc65cc05a5bb2::$prefixLengthsPsr4;
291
+ $loader->prefixDirsPsr4 = ComposerStaticInit704c776347bd87cd071dc65cc05a5bb2::$prefixDirsPsr4;
292
+ $loader->prefixesPsr0 = ComposerStaticInit704c776347bd87cd071dc65cc05a5bb2::$prefixesPsr0;
293
+ $loader->classMap = ComposerStaticInit704c776347bd87cd071dc65cc05a5bb2::$classMap;
294
 
295
  }, null, ClassLoader::class);
296
  }