Mollie Payments for WooCommerce - Version 2.6.0

Version Description

  • 07/06/2017 =
  • Add support for WooCommerce 3.0 (backwards compatible with older versions of WooCommerce)
  • The expiry date that's shown for payments via Bank transfer is now in the correct (translated) format
  • Fix redundant "DESCRIBE *__mollie_pending_payment" error (on new installs)
  • WooCommerce Subscriptions:
    • Important: added Subscription Status tool to fix broken subscriptions, see instructions
    • SEPA recurring payments, take initial order status from settings, default On-Hold (instead of Completed)
    • Fix issue where valid subscriptions are set to 'on-hold' and 'manual renewal' only 15 days after renewal payment is created (now only do that after 21 days)
    • Improve "Subscription switching" support to also allow amount changes
    • Fix typo in recurring payment order notes
Download this release

Release Info

Developer davdebcom
Plugin Icon wp plugin Mollie Payments for WooCommerce
Version 2.6.0
Comparing to
See all releases

Code changes from version 2.5.4 to 2.6.0

i18n/languages/mollie-payments-for-woocommerce-nl_NL.mo CHANGED
Binary file
i18n/languages/mollie-payments-for-woocommerce-nl_NL.po CHANGED
@@ -5,56 +5,52 @@ msgstr ""
5
  "Project-Id-Version: Mollie Payments for WooCommerce 2.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mollie-payments-"
7
  "for-woocommerce\n"
8
- "POT-Creation-Date: 2017-03-07 10:43+0100\n"
9
- "PO-Revision-Date: 2017-03-07 10:47+0100\n"
10
  "Last-Translator: Lennard van Gunst <lennard@mollie.com>\n"
11
  "Language-Team: Mollie <info@mollie.nl>\n"
12
  "Language: nl\n"
13
  "MIME-Version: 1.0\n"
14
  "Content-Type: text/plain; charset=UTF-8\n"
15
  "Content-Transfer-Encoding: 8bit\n"
16
- "X-Generator: Poedit 1.8.11\n"
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
  "X-Poedit-Basepath: ../..\n"
19
- "X-Poedit-KeywordsList: __\n"
20
  "X-Poedit-SearchPath-0: .\n"
21
 
22
- #: includes/mollie/wc/gateway/abstract.php:86
23
  msgid "Enable/Disable"
24
  msgstr "In-/uitschakelen"
25
 
26
- #: includes/mollie/wc/gateway/abstract.php:88
27
- #, php-format
28
  msgid "Enable %s"
29
  msgstr "%s inschakelen"
30
 
31
- #: includes/mollie/wc/gateway/abstract.php:92
32
  msgid "Title"
33
  msgstr "Titel"
34
 
35
- #: includes/mollie/wc/gateway/abstract.php:94
36
- #, php-format
37
  msgid ""
38
  "This controls the title which the user sees during checkout. Default <code>"
39
  "%s</code>"
40
  msgstr ""
41
  "De titel welke de gebruiker ziet in de winkelwagen. Standaard <code>%s</code>"
42
 
43
- #: includes/mollie/wc/gateway/abstract.php:99
44
  msgid "Display logo"
45
  msgstr "Logo weergeven"
46
 
47
- #: includes/mollie/wc/gateway/abstract.php:101
48
  msgid "Display logo on checkout page. Default <code>enabled</code>"
49
  msgstr "Logo weergeven in de winkelwagen. Standaard <code>ingeschakeld</code>"
50
 
51
- #: includes/mollie/wc/gateway/abstract.php:105
52
- #: includes/mollie/wc/helper/settings.php:351
53
  msgid "Description"
54
  msgstr "Omschrijving"
55
 
56
- #: includes/mollie/wc/gateway/abstract.php:107
57
- #, php-format
58
  msgid ""
59
  "Payment method description that the customer will see on your checkout. "
60
  "Default <code>%s</code>"
@@ -62,17 +58,18 @@ msgstr ""
62
  "Betaalmethode omschrijving is zichtbaar in de winkelwagen. Standaard <code>"
63
  "%s</code>"
64
 
65
- #: includes/mollie/wc/gateway/abstract.php:116
66
  msgid "Initial order status"
67
  msgstr "Standaard bestelstatus"
68
 
69
- #: includes/mollie/wc/gateway/abstract.php:119
70
- #: includes/mollie/wc/helper/settings.php:365
71
  msgid "default"
72
  msgstr "standaard"
73
 
74
- #: includes/mollie/wc/gateway/abstract.php:125
75
- #, php-format
 
76
  msgid ""
77
  "Some payment methods take longer than a few hours to complete. The initial "
78
  "order state is then set to '%s'. This ensures the order is not cancelled "
@@ -82,26 +79,29 @@ msgstr ""
82
  "In dat geval wordt de bestelstatus ingesteld op '%s'. Dit voorkomt dat de "
83
  "bestelling per ongeluk geannuleerd wordt door de instelling %s."
84
 
85
- #: includes/mollie/wc/gateway/abstract.php:127
86
  msgid "Hold Stock (minutes)"
87
- msgstr "Voorraad behouden (minuten)"
88
-
89
- #: includes/mollie/wc/gateway/abstract.php:170
90
- msgid "Gateway Disabled"
91
- msgstr "Gateway uitgeschakeld"
92
 
93
- #: includes/mollie/wc/gateway/abstract.php:193
94
- #: includes/mollie/wc/helper/settings.php:208
 
95
  msgid "Test mode enabled."
96
  msgstr "Test modus ingeschakeld."
97
 
98
- #: includes/mollie/wc/gateway/abstract.php:195
99
- #, php-format
 
 
 
 
 
100
  msgid "No API key provided. Please %sset you Mollie API key%s first."
101
  msgstr "Geen API key ingesteld. %sStel een API key in%s."
102
 
103
- #: includes/mollie/wc/gateway/abstract.php:207
104
- #, php-format
 
105
  msgid ""
106
  "%s not enabled in your Mollie profile. You can enabled it by editing your "
107
  "%sMollie profile%s."
@@ -109,70 +109,62 @@ msgstr ""
109
  "%s is niet ingeschakeld in je Mollie profiel. Je kunt de betaalmethode "
110
  "inschakelen in je %sMollie profiel%s."
111
 
112
- #: includes/mollie/wc/gateway/abstract.php:220
113
- #, php-format
 
114
  msgid "Shop currency %s not supported by Mollie. Mollie only supports: %s."
115
  msgstr ""
116
  "Winkel valuta %s wordt niet door Mollie ondersteund. Mollie ondersteunt "
117
  "alleen: %s."
118
 
119
- #: includes/mollie/wc/gateway/abstract.php:287
120
- #: includes/mollie/wc/gateway/abstractsubscription.php:136
121
- #, php-format
122
  msgid "Could not load order %s"
123
  msgstr "Kan bestelling %s niet laden"
124
 
125
- #: includes/mollie/wc/gateway/abstract.php:345
126
- #: includes/mollie/wc/gateway/abstractsubscription.php:386
127
  msgid "Awaiting payment confirmation."
128
  msgstr "In afwachting van betaling bevestiging."
129
 
130
- #: includes/mollie/wc/gateway/abstract.php:350
131
- #: includes/mollie/wc/gateway/abstractseparecurring.php:68
132
- #: includes/mollie/wc/gateway/abstractsubscription.php:391
133
- #, php-format
134
  msgid "%s payment started (%s)."
135
  msgstr "%s betaling gestart (%s)."
136
 
137
- #: includes/mollie/wc/gateway/abstract.php:352
 
138
  #: includes/mollie/wc/gateway/abstract.php:605
139
- #: includes/mollie/wc/gateway/abstract.php:659
140
- #: includes/mollie/wc/gateway/abstract.php:709
141
- #: includes/mollie/wc/gateway/abstract.php:739
142
- #: includes/mollie/wc/gateway/abstractseparecurring.php:70
143
- #: includes/mollie/wc/gateway/abstractseparecurring.php:177
144
- #: includes/mollie/wc/gateway/abstractsubscription.php:393
145
  msgid "test mode"
146
  msgstr "test modus"
147
 
148
- #: includes/mollie/wc/gateway/abstract.php:367
149
- #: includes/mollie/wc/gateway/abstractsubscription.php:223
150
- #, php-format
151
  msgid "Could not create %s payment."
152
  msgstr "Kon geen %s betaling aanmaken."
153
 
154
- #: includes/mollie/wc/gateway/abstract.php:602
155
- #, php-format
 
156
  msgid "%s payment %s (%s)."
157
  msgstr "%s betaling %s (%s)."
158
 
159
- #: includes/mollie/wc/gateway/abstract.php:657
160
- #: includes/mollie/wc/gateway/abstractseparecurring.php:175
161
- #, php-format
162
  msgid "Order completed using %s payment (%s)."
163
  msgstr "Bestelling afgerond met %s betaling (%s)."
164
 
165
- #: includes/mollie/wc/gateway/abstract.php:707
166
- #, php-format
167
  msgid "%s payment cancelled (%s)."
168
  msgstr "%s betaling geannuleerd (%s)."
169
 
170
- #: includes/mollie/wc/gateway/abstract.php:737
171
- #, php-format
172
  msgid "%s payment expired (%s)."
173
  msgstr "%s betaling verlopen (%s)."
174
 
175
- #: includes/mollie/wc/gateway/abstract.php:753
176
  msgid ""
177
  "You have cancelled your payment. Please complete your order with a different "
178
  "payment method."
@@ -180,20 +172,22 @@ msgstr ""
180
  "Je hebt de betaling geannuleerd. U kunt de bestelling afronden met een "
181
  "andere betaalmethode."
182
 
183
- #: includes/mollie/wc/gateway/abstract.php:830
184
- #, php-format
 
 
185
  msgid "Refunded %s%s (reason: %s) - Payment ID: %s, Refund: %s"
186
  msgstr "Terugstorting %s%s (reden: %s) - Payment ID: %s, Refund: %s"
187
 
188
- #: includes/mollie/wc/gateway/abstract.php:904
189
  msgid "Payment"
190
  msgstr "Betaling"
191
 
192
- #: includes/mollie/wc/gateway/abstract.php:925
193
  msgid "We have not received a definite payment status."
194
  msgstr "We hebben nog geen definitieve status van de betaling ontvangen."
195
 
196
- #: includes/mollie/wc/gateway/abstract.php:930
197
  msgid ""
198
  "We have not received a definite payment status. You will receive an email as "
199
  "soon as we receive a confirmation of the bank/merchant."
@@ -201,26 +195,16 @@ msgstr ""
201
  "We hebben nog geen definitieve status van de betaling ontvangen. U ontvangt "
202
  "een e-mail zodra wij een bevestiging van de bank ontvangen."
203
 
204
- #: includes/mollie/wc/gateway/abstract.php:937
205
- #, php-format
206
  msgid "Payment completed with <strong>%s</strong>"
207
  msgstr "Betaling afgerond met <strong>%s</strong>"
208
 
209
- #: includes/mollie/wc/gateway/abstractseparecurring.php:60
210
- #, php-format
211
- msgid "Awaiting payment confirmation. For %s Days"
212
- msgstr "Betaling in afwachting. Voor %s dagen"
213
-
214
- #: includes/mollie/wc/gateway/abstractsubscription.php:183
215
- msgid "Payment cannot be processed."
216
- msgstr "Betaling kan niet worden verwerkt."
217
-
218
  #: includes/mollie/wc/gateway/banktransfer.php:32
219
  msgid "Expiry date"
220
  msgstr "Verloopdatum"
221
 
222
  #: includes/mollie/wc/gateway/banktransfer.php:34
223
- #, php-format
224
  msgid ""
225
  "Number of days after the payment will expire. Default <code>%d</code> days"
226
  msgstr ""
@@ -250,8 +234,8 @@ msgstr ""
250
  msgid "Mail payment instructions"
251
  msgstr "Mail betalingsinstructies"
252
 
 
253
  #: includes/mollie/wc/gateway/banktransfer.php:52
254
- #, php-format
255
  msgid ""
256
  "Should Mollie automatically mail the payment instructions to the customer? "
257
  "Default <code>%s</code>"
@@ -260,10 +244,9 @@ msgstr ""
260
  "<code>%s</code>"
261
 
262
  #: includes/mollie/wc/gateway/banktransfer.php:52
263
- #: includes/mollie/wc/helper/settings.php:201
264
- #: includes/mollie/wc/helper/settings.php:380
265
- msgid "Enabled"
266
- msgstr "Ingeschakeld"
267
 
268
  #: includes/mollie/wc/gateway/banktransfer.php:55
269
  msgid ""
@@ -278,11 +261,12 @@ msgstr ""
278
  msgid "Bank Transfer"
279
  msgstr "Overboeking"
280
 
 
 
281
  #: includes/mollie/wc/gateway/banktransfer.php:171
282
  #: includes/mollie/wc/gateway/directdebit.php:51
283
- #: includes/mollie/wc/gateway/ideal.php:104
284
  #: includes/mollie/wc/gateway/sofort.php:56
285
- #, php-format
286
  msgid "Payment completed by <strong>%s</strong> (IBAN: %s, BIC: %s)"
287
  msgstr "Betaling afgerond door <strong>%s</strong> (IBAN: %s, BIC: %s)"
288
 
@@ -294,40 +278,38 @@ msgstr ""
294
  "Rond de betaling af door het totale bedrag over te boeken naar de volgende "
295
  "rekening:"
296
 
 
297
  #: includes/mollie/wc/gateway/banktransfer.php:185
298
- #, php-format
299
  msgid "Beneficiary: %s"
300
  msgstr "Begunstigde: %s"
301
 
302
  #: includes/mollie/wc/gateway/banktransfer.php:186
303
- #, php-format
304
  msgid "IBAN: <strong>%s</strong>"
305
  msgstr "IBAN: <strong>%s</strong>"
306
 
307
  #: includes/mollie/wc/gateway/banktransfer.php:187
308
- #, php-format
309
  msgid "BIC: %s"
310
  msgstr "BIC: %s"
311
 
 
 
312
  #: includes/mollie/wc/gateway/banktransfer.php:192
313
- #, php-format
314
  msgid "Payment reference: %s"
315
  msgstr "Betalingskenmerk: %s"
316
 
 
 
317
  #: includes/mollie/wc/gateway/banktransfer.php:197
318
- #, php-format
319
  msgid "Please provide the payment reference <strong>%s</strong>"
320
  msgstr ""
321
  "Gelieve het betalingskenmerk <strong>%s</strong> op te geven bij de "
322
  "overboeking"
323
 
324
  #: includes/mollie/wc/gateway/banktransfer.php:210
325
- #, php-format
326
  msgid "The payment will expire on <strong>%s</strong>."
327
  msgstr "De betaling zal op <strong>%s</strong> verlopen."
328
 
329
  #: includes/mollie/wc/gateway/banktransfer.php:217
330
- #, php-format
331
  msgid ""
332
  "The payment will expire on <strong>%s</strong>. Please make sure you "
333
  "transfer the total amount before this date."
@@ -347,8 +329,8 @@ msgstr "Bitcoin"
347
  msgid "Credit card"
348
  msgstr "Creditcard"
349
 
 
350
  #: includes/mollie/wc/gateway/creditcard.php:56
351
- #, php-format
352
  msgid "Payment completed by <strong>%s</strong>"
353
  msgstr "Betaling afgerond door <strong>%s</strong>"
354
 
@@ -356,21 +338,12 @@ msgstr "Betaling afgerond door <strong>%s</strong>"
356
  msgid "SEPA Direct Debit"
357
  msgstr "SEPA-incasso"
358
 
359
- #: includes/mollie/wc/gateway/ideal.php:29
360
- msgid "Issuers empty option"
361
- msgstr ""
362
-
363
- #: includes/mollie/wc/gateway/ideal.php:31
364
- msgid ""
365
- "This text will be displayed as the first option in the iDEAL issuers drop "
366
- "down"
367
- msgstr ""
368
-
369
- #: includes/mollie/wc/gateway/ideal.php:51
370
  msgid "iDEAL"
371
  msgstr "iDEAL"
372
 
373
- #: includes/mollie/wc/gateway/ideal.php:60
 
374
  msgid "Select your bank"
375
  msgstr "Selecteer uw bank"
376
 
@@ -386,8 +359,9 @@ msgstr "Bancontact / Mister Cash"
386
  msgid "PayPal"
387
  msgstr "PayPal"
388
 
 
 
389
  #: includes/mollie/wc/gateway/paypal.php:56
390
- #, php-format
391
  msgid ""
392
  "Payment completed by <strong>%s</strong> - %s (PayPal transaction ID: %s)"
393
  msgstr ""
@@ -413,83 +387,86 @@ msgstr ""
413
  "Ongeldige API key ingesteld. De API key moet beginnen met 'live_’ of 'test_’ "
414
  "en mag verder geen speciale tekens bevatten."
415
 
416
- #: includes/mollie/wc/helper/data.php:636
417
- #, php-format
418
  msgid "Item #%s stock incremented from %s to %s."
419
  msgstr "Artikel #%s voorraad verhoogd van %s naar %s."
420
 
421
- #: includes/mollie/wc/helper/settings.php:130
422
  msgid "Error"
423
  msgstr "Fout"
424
 
425
- #: includes/mollie/wc/helper/settings.php:140
426
  msgid "Mollie status:"
427
  msgstr "Mollie status:"
428
 
429
- #: includes/mollie/wc/helper/settings.php:141
430
  msgid "Connected"
431
  msgstr "Verbonden"
432
 
433
- #: includes/mollie/wc/helper/settings.php:201
434
  msgid "Gateway enabled"
435
  msgstr "Gateway ingeschakeld"
436
 
437
- #: includes/mollie/wc/helper/settings.php:202
 
 
 
 
438
  msgid "Gateway disabled"
439
  msgstr "Gateway uitgeschakeld"
440
 
 
 
441
  #: includes/mollie/wc/helper/settings.php:202
442
- msgid "Disabled"
443
- msgstr "Uitgeschakeld"
444
-
445
- #: includes/mollie/wc/helper/settings.php:213
446
- #, php-format
447
  msgid "The following payment methods are activated in your %sMollie profile%s:"
448
  msgstr "De volgende betaalmethodes zijn ingeschakeld in je %sMollie profiel%s:"
449
 
450
- #: includes/mollie/wc/helper/settings.php:223
451
  msgid "Refresh"
452
  msgstr "Ververs"
453
 
454
- #: includes/mollie/wc/helper/settings.php:247
455
  msgid "Edit"
456
  msgstr "Bewerk"
457
 
458
- #: includes/mollie/wc/helper/settings.php:278
 
 
459
  msgid "Order {order_number}"
460
  msgstr "Bestelling {order_number}"
461
 
462
- #: includes/mollie/wc/helper/settings.php:281
463
  msgid "Log plugin events."
464
  msgstr "Log plugin events."
465
 
466
- #: includes/mollie/wc/helper/settings.php:286
467
  msgid "View logs"
468
  msgstr "Bekijk logboeken"
469
 
470
- #: includes/mollie/wc/helper/settings.php:292
471
- #, php-format
472
  msgid "Log files are saved to <code>%s</code>"
473
  msgstr "Logboeken worden opgeslagen in <code>%s</code>"
474
 
475
- #: includes/mollie/wc/helper/settings.php:299 includes/mollie/wc/plugin.php:374
476
  msgid "Mollie settings"
477
  msgstr "Mollie instellingen"
478
 
479
- #: includes/mollie/wc/helper/settings.php:302
480
  msgid ""
481
  "The following options are required to use the plugin and are used by all "
482
  "Mollie payment methods"
483
  msgstr ""
484
  "De volgende instellingen zijn nodig om gebruik te maken van de Mollie plugin."
485
 
486
- #: includes/mollie/wc/helper/settings.php:306
487
  msgid "Live API key"
488
  msgstr "Live API key"
489
 
490
- #: includes/mollie/wc/helper/settings.php:311
491
- #: includes/mollie/wc/helper/settings.php:337
492
- #, php-format
 
493
  msgid ""
494
  "The API key is used to connect to Mollie. You can find your <strong>%s</"
495
  "strong> API key in your %sMollie profile%s"
@@ -497,31 +474,32 @@ msgstr ""
497
  "De API key wordt gebruikt om verbinding te maken met Mollie. Je kan je "
498
  "<strong>%s</strong> API key vinden in je %sMollie profiel%s"
499
 
500
- #: includes/mollie/wc/helper/settings.php:317
501
  msgid "Live API key should start with live_"
502
  msgstr "Live API key moet beginnen met live_"
503
 
504
- #: includes/mollie/wc/helper/settings.php:325
505
  msgid "Enable test mode"
506
  msgstr "Test modus inschakelen"
507
 
508
- #: includes/mollie/wc/helper/settings.php:328
509
  msgid ""
510
  "Enable test mode if you want to test the plugin without using real payments."
511
  msgstr ""
512
  "Schakel de test modus in wanneer u de plugin wilt testen zonder echte "
513
  "betalingen te moeten doen."
514
 
515
- #: includes/mollie/wc/helper/settings.php:332
516
  msgid "Test API key"
517
  msgstr "Test API key"
518
 
519
- #: includes/mollie/wc/helper/settings.php:343
520
  msgid "Test API key should start with test_"
521
  msgstr "Test API key moet beginnen met test_"
522
 
523
- #: includes/mollie/wc/helper/settings.php:354
524
- #, php-format
 
525
  msgid ""
526
  "Payment description send to Mollie. Default <code>%s</code><br/>You can use "
527
  "the following tags: %s"
@@ -529,66 +507,54 @@ msgstr ""
529
  "Betaling beschrijving. Standaard <code>%s</code><br/> Je kunt gebruik maken "
530
  "van de volgende tags: %s"
531
 
532
- #: includes/mollie/wc/helper/settings.php:360
533
  msgid "Payment screen language"
534
  msgstr "Taal betaalscherm"
535
 
536
- #: includes/mollie/wc/helper/settings.php:363
537
  msgid "Detect using browser language"
538
  msgstr "Detecteren met behulp van de internet browser taal"
539
 
540
- #: includes/mollie/wc/helper/settings.php:365
541
- #, php-format
542
  msgid "Send WordPress language (%s)"
543
  msgstr "Stuur de WordPress taal door (%s)"
544
 
545
- #: includes/mollie/wc/helper/settings.php:366
546
  msgid "Dutch"
547
  msgstr "Nederlands"
548
 
549
- #: includes/mollie/wc/helper/settings.php:367
550
  msgid "Flemish (Belgium)"
551
  msgstr "Vlaams (België)"
552
 
553
- #: includes/mollie/wc/helper/settings.php:368
554
  msgid "English"
555
  msgstr "Engels"
556
 
557
- #: includes/mollie/wc/helper/settings.php:369
558
  msgid "German"
559
  msgstr "Duits"
560
 
561
- #: includes/mollie/wc/helper/settings.php:370
562
  msgid "Spanish"
563
  msgstr "Spaans"
564
 
565
- #: includes/mollie/wc/helper/settings.php:371
566
  msgid "French"
567
  msgstr "Frans"
568
 
569
- #: includes/mollie/wc/helper/settings.php:372
570
  msgid "French (Belgium)"
571
  msgstr "Frans (België)"
572
 
573
- #: includes/mollie/wc/helper/settings.php:378
574
- msgid "Store customer details at Mollie"
575
- msgstr "Klantgegevens opslaan bij Mollie"
576
-
577
- #: includes/mollie/wc/helper/settings.php:380
578
- #, php-format
579
- msgid ""
580
- "Should Mollie store customers name and email address for Single Click "
581
- "Payments? Default <code>%s</code>"
582
- msgstr ""
583
- "Laat Mollie de naam en het e-mailadres van de klant opslaan voor Single "
584
- "Click Payments. Standaard <code>%s</code>"
585
-
586
- #: includes/mollie/wc/helper/settings.php:387
587
  msgid "Debug Log"
588
  msgstr "Debug Log"
589
 
 
 
590
  #: includes/mollie/wc/helper/status.php:53
591
- #, php-format
592
  msgid ""
593
  "The %s plugin requires at least WooCommerce version %s, you are using "
594
  "version %s. Please update your WooCommerce plugin."
@@ -604,8 +570,9 @@ msgstr ""
604
  "Mollie API client niet geïnstalleerd. Zorg er voor dat de plugin juist is "
605
  "geïnstalleerd."
606
 
 
 
607
  #: includes/mollie/wc/helper/status.php:82
608
- #, php-format
609
  msgid "The client requires PHP version >= %s, you have %s."
610
  msgstr "De API client heeft PHP versie >= %s nodig, jij gebruikt versie %s."
611
 
@@ -625,8 +592,8 @@ msgstr ""
625
  "De Mollie API client heeft de PHP extensie cURL nodig om te werken. Schakel "
626
  "de PHP extensie ‘curl’ in."
627
 
 
628
  #: includes/mollie/wc/helper/status.php:99
629
- #, php-format
630
  msgid ""
631
  "The Mollie API client requires the following PHP cURL functions to be "
632
  "available: %s. Please make sure all of these functions are available."
@@ -634,39 +601,37 @@ msgstr ""
634
  "De Mollie API client heeft de volgende PHP cURL functies nodig: %s. Zorg dat "
635
  "al deze functies beschikbaar zijn."
636
 
637
- #: includes/mollie/wc/plugin.php:101
638
- #, php-format
639
- msgid "%s payment failed (%s)."
640
- msgstr "%s betaling mislukt (%s)."
641
-
642
- #: includes/mollie/wc/plugin.php:381
643
  msgid "Logs"
644
  msgstr "Logboeken"
645
 
646
  #: mollie-payments-for-woocommerce.php:49
647
- #, php-format
648
  msgid "Could not activate plugin %s"
649
  msgstr "Kan plugin %s niet activeren"
650
 
651
- #: mollie-payments-for-woocommerce.php:97
652
- #, php-format
653
  msgid "%s deactivated because it depends on WooCommerce."
654
  msgstr "%s gedeactiveerd omdat het afhankelijk is van de plugin WooCommerce."
655
 
656
- #~ msgid "Mollie Payments for WooCommerce"
657
- #~ msgstr "Mollie Payments for WooCommerce"
 
658
 
659
- #~ msgid "https://github.com/mollie/WooCommerce"
660
- #~ msgstr "https://github.com/mollie/WooCommerce"
 
661
 
662
- #~ msgid "Accept payments in WooCommerce with the official Mollie plugin"
663
- #~ msgstr "Accepteer betalingen in WooCommerce met de officiële Mollie plugin"
 
664
 
665
- #~ msgid "Mollie"
666
- #~ msgstr "Mollie"
 
667
 
668
- #~ msgid "https://www.mollie.com"
669
- #~ msgstr "https://www.mollie.com"
 
670
 
671
  #~ msgid ""
672
  #~ "Accept payments in WooCommerce with the official Mollie plugin for iDEAL, "
5
  "Project-Id-Version: Mollie Payments for WooCommerce 2.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mollie-payments-"
7
  "for-woocommerce\n"
8
+ "POT-Creation-Date: 2016-10-06 15:22+0200\n"
9
+ "PO-Revision-Date: 2016-10-06 15:22+0200\n"
10
  "Last-Translator: Lennard van Gunst <lennard@mollie.com>\n"
11
  "Language-Team: Mollie <info@mollie.nl>\n"
12
  "Language: nl\n"
13
  "MIME-Version: 1.0\n"
14
  "Content-Type: text/plain; charset=UTF-8\n"
15
  "Content-Transfer-Encoding: 8bit\n"
16
+ "X-Generator: Poedit 1.8.9\n"
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
  "X-Poedit-Basepath: ../..\n"
 
19
  "X-Poedit-SearchPath-0: .\n"
20
 
21
+ #: includes/mollie/wc/gateway/abstract.php:83
22
  msgid "Enable/Disable"
23
  msgstr "In-/uitschakelen"
24
 
25
+ #: includes/mollie/wc/gateway/abstract.php:85
 
26
  msgid "Enable %s"
27
  msgstr "%s inschakelen"
28
 
29
+ #: includes/mollie/wc/gateway/abstract.php:89
30
  msgid "Title"
31
  msgstr "Titel"
32
 
33
+ #: includes/mollie/wc/gateway/abstract.php:91
 
34
  msgid ""
35
  "This controls the title which the user sees during checkout. Default <code>"
36
  "%s</code>"
37
  msgstr ""
38
  "De titel welke de gebruiker ziet in de winkelwagen. Standaard <code>%s</code>"
39
 
40
+ #: includes/mollie/wc/gateway/abstract.php:96
41
  msgid "Display logo"
42
  msgstr "Logo weergeven"
43
 
44
+ #: includes/mollie/wc/gateway/abstract.php:98
45
  msgid "Display logo on checkout page. Default <code>enabled</code>"
46
  msgstr "Logo weergeven in de winkelwagen. Standaard <code>ingeschakeld</code>"
47
 
48
+ #: includes/mollie/wc/gateway/abstract.php:102
49
+ #: includes/mollie/wc/helper/settings.php:340
50
  msgid "Description"
51
  msgstr "Omschrijving"
52
 
53
+ #: includes/mollie/wc/gateway/abstract.php:104
 
54
  msgid ""
55
  "Payment method description that the customer will see on your checkout. "
56
  "Default <code>%s</code>"
58
  "Betaalmethode omschrijving is zichtbaar in de winkelwagen. Standaard <code>"
59
  "%s</code>"
60
 
61
+ #: includes/mollie/wc/gateway/abstract.php:113
62
  msgid "Initial order status"
63
  msgstr "Standaard bestelstatus"
64
 
65
+ #: includes/mollie/wc/gateway/abstract.php:116
66
+ #: includes/mollie/wc/helper/settings.php:354
67
  msgid "default"
68
  msgstr "standaard"
69
 
70
+ #. translators: Placeholder 1: Default order status, placeholder 2: Link to
71
+ #. 'Hold Stock' setting
72
+ #: includes/mollie/wc/gateway/abstract.php:122
73
  msgid ""
74
  "Some payment methods take longer than a few hours to complete. The initial "
75
  "order state is then set to '%s'. This ensures the order is not cancelled "
79
  "In dat geval wordt de bestelstatus ingesteld op '%s'. Dit voorkomt dat de "
80
  "bestelling per ongeluk geannuleerd wordt door de instelling %s."
81
 
82
+ #: includes/mollie/wc/gateway/abstract.php:124
83
  msgid "Hold Stock (minutes)"
84
+ msgstr ""
 
 
 
 
85
 
86
+ #: includes/mollie/wc/gateway/abstract.php:153
87
+ #: includes/mollie/wc/gateway/abstract.php:197
88
+ #: includes/mollie/wc/helper/settings.php:197
89
  msgid "Test mode enabled."
90
  msgstr "Test modus ingeschakeld."
91
 
92
+ #: includes/mollie/wc/gateway/abstract.php:174
93
+ msgid "Gateway Disabled"
94
+ msgstr "Gateway uitgeschakeld"
95
+
96
+ #. translators: The surrounding %s's Will be replaced by a link to the global
97
+ #. setting page
98
+ #: includes/mollie/wc/gateway/abstract.php:199
99
  msgid "No API key provided. Please %sset you Mollie API key%s first."
100
  msgstr "Geen API key ingesteld. %sStel een API key in%s."
101
 
102
+ #. translators: Placeholder 1: payment method title. The surrounding %s's Will
103
+ #. be replaced by a link to the Mollie profile
104
+ #: includes/mollie/wc/gateway/abstract.php:211
105
  msgid ""
106
  "%s not enabled in your Mollie profile. You can enabled it by editing your "
107
  "%sMollie profile%s."
109
  "%s is niet ingeschakeld in je Mollie profiel. Je kunt de betaalmethode "
110
  "inschakelen in je %sMollie profiel%s."
111
 
112
+ #. translators: Placeholder 1: WooCommerce currency, placeholder 2: Supported
113
+ #. Mollie currencies
114
+ #: includes/mollie/wc/gateway/abstract.php:224
115
  msgid "Shop currency %s not supported by Mollie. Mollie only supports: %s."
116
  msgstr ""
117
  "Winkel valuta %s wordt niet door Mollie ondersteund. Mollie ondersteunt "
118
  "alleen: %s."
119
 
120
+ #: includes/mollie/wc/gateway/abstract.php:291
 
 
121
  msgid "Could not load order %s"
122
  msgstr "Kan bestelling %s niet laden"
123
 
124
+ #: includes/mollie/wc/gateway/abstract.php:386
 
125
  msgid "Awaiting payment confirmation."
126
  msgstr "In afwachting van betaling bevestiging."
127
 
128
+ #. translators: Placeholder 1: Payment method title, placeholder 2: payment ID
129
+ #: includes/mollie/wc/gateway/abstract.php:391
 
 
130
  msgid "%s payment started (%s)."
131
  msgstr "%s betaling gestart (%s)."
132
 
133
+ #: includes/mollie/wc/gateway/abstract.php:393
134
+ #: includes/mollie/wc/gateway/abstract.php:574
135
  #: includes/mollie/wc/gateway/abstract.php:605
136
+ #: includes/mollie/wc/gateway/abstract.php:639
137
+ #: includes/mollie/wc/gateway/abstract.php:667
 
 
 
 
138
  msgid "test mode"
139
  msgstr "test modus"
140
 
141
+ #. translators: Placeholder 1: Payment method title
142
+ #: includes/mollie/wc/gateway/abstract.php:411
 
143
  msgid "Could not create %s payment."
144
  msgstr "Kon geen %s betaling aanmaken."
145
 
146
+ #. translators: Placeholder 1: payment method title, placeholder 2: payment
147
+ #. status, placeholder 3: payment ID
148
+ #: includes/mollie/wc/gateway/abstract.php:571
149
  msgid "%s payment %s (%s)."
150
  msgstr "%s betaling %s (%s)."
151
 
152
+ #. translators: Placeholder 1: payment method title, placeholder 2: payment ID
153
+ #: includes/mollie/wc/gateway/abstract.php:603
 
154
  msgid "Order completed using %s payment (%s)."
155
  msgstr "Bestelling afgerond met %s betaling (%s)."
156
 
157
+ #. translators: Placeholder 1: payment method title, placeholder 2: payment ID
158
+ #: includes/mollie/wc/gateway/abstract.php:637
159
  msgid "%s payment cancelled (%s)."
160
  msgstr "%s betaling geannuleerd (%s)."
161
 
162
+ #. translators: Placeholder 1: payment method title, placeholder 2: payment ID
163
+ #: includes/mollie/wc/gateway/abstract.php:665
164
  msgid "%s payment expired (%s)."
165
  msgstr "%s betaling verlopen (%s)."
166
 
167
+ #: includes/mollie/wc/gateway/abstract.php:681
168
  msgid ""
169
  "You have cancelled your payment. Please complete your order with a different "
170
  "payment method."
172
  "Je hebt de betaling geannuleerd. U kunt de bestelling afronden met een "
173
  "andere betaalmethode."
174
 
175
+ #. translators: Placeholder 1: currency, placeholder 2: refunded amount,
176
+ #. placeholder 3: optional refund reason, placeholder 4: payment ID,
177
+ #. placeholder 5: refund ID
178
+ #: includes/mollie/wc/gateway/abstract.php:758
179
  msgid "Refunded %s%s (reason: %s) - Payment ID: %s, Refund: %s"
180
  msgstr "Terugstorting %s%s (reden: %s) - Payment ID: %s, Refund: %s"
181
 
182
+ #: includes/mollie/wc/gateway/abstract.php:827
183
  msgid "Payment"
184
  msgstr "Betaling"
185
 
186
+ #: includes/mollie/wc/gateway/abstract.php:848
187
  msgid "We have not received a definite payment status."
188
  msgstr "We hebben nog geen definitieve status van de betaling ontvangen."
189
 
190
+ #: includes/mollie/wc/gateway/abstract.php:853
191
  msgid ""
192
  "We have not received a definite payment status. You will receive an email as "
193
  "soon as we receive a confirmation of the bank/merchant."
195
  "We hebben nog geen definitieve status van de betaling ontvangen. U ontvangt "
196
  "een e-mail zodra wij een bevestiging van de bank ontvangen."
197
 
198
+ #. translators: Placeholder 1: payment method
199
+ #: includes/mollie/wc/gateway/abstract.php:860
200
  msgid "Payment completed with <strong>%s</strong>"
201
  msgstr "Betaling afgerond met <strong>%s</strong>"
202
 
 
 
 
 
 
 
 
 
 
203
  #: includes/mollie/wc/gateway/banktransfer.php:32
204
  msgid "Expiry date"
205
  msgstr "Verloopdatum"
206
 
207
  #: includes/mollie/wc/gateway/banktransfer.php:34
 
208
  msgid ""
209
  "Number of days after the payment will expire. Default <code>%d</code> days"
210
  msgstr ""
234
  msgid "Mail payment instructions"
235
  msgstr "Mail betalingsinstructies"
236
 
237
+ #. translators: Placeholder 1: enabled or disabled
238
  #: includes/mollie/wc/gateway/banktransfer.php:52
 
239
  msgid ""
240
  "Should Mollie automatically mail the payment instructions to the customer? "
241
  "Default <code>%s</code>"
244
  "<code>%s</code>"
245
 
246
  #: includes/mollie/wc/gateway/banktransfer.php:52
247
+ #: includes/mollie/wc/helper/settings.php:191
248
+ msgid "Disabled"
249
+ msgstr "Uitgeschakeld"
 
250
 
251
  #: includes/mollie/wc/gateway/banktransfer.php:55
252
  msgid ""
261
  msgid "Bank Transfer"
262
  msgstr "Overboeking"
263
 
264
+ #. translators: Placeholder 1: consumer name, placeholder 2: consumer IBAN,
265
+ #. placeholder 3: consumer BIC
266
  #: includes/mollie/wc/gateway/banktransfer.php:171
267
  #: includes/mollie/wc/gateway/directdebit.php:51
268
+ #: includes/mollie/wc/gateway/ideal.php:86
269
  #: includes/mollie/wc/gateway/sofort.php:56
 
270
  msgid "Payment completed by <strong>%s</strong> (IBAN: %s, BIC: %s)"
271
  msgstr "Betaling afgerond door <strong>%s</strong> (IBAN: %s, BIC: %s)"
272
 
278
  "Rond de betaling af door het totale bedrag over te boeken naar de volgende "
279
  "rekening:"
280
 
281
+ #. translators: Placeholder 1: 'Stichting Mollie Payments'
282
  #: includes/mollie/wc/gateway/banktransfer.php:185
 
283
  msgid "Beneficiary: %s"
284
  msgstr "Begunstigde: %s"
285
 
286
  #: includes/mollie/wc/gateway/banktransfer.php:186
 
287
  msgid "IBAN: <strong>%s</strong>"
288
  msgstr "IBAN: <strong>%s</strong>"
289
 
290
  #: includes/mollie/wc/gateway/banktransfer.php:187
 
291
  msgid "BIC: %s"
292
  msgstr "BIC: %s"
293
 
294
+ #. translators: Placeholder 1: Payment reference e.g. RF49-0000-4716-6216
295
+ #. (SEPA) or +++513/7587/59959+++ (Belgium)
296
  #: includes/mollie/wc/gateway/banktransfer.php:192
 
297
  msgid "Payment reference: %s"
298
  msgstr "Betalingskenmerk: %s"
299
 
300
+ #. translators: Placeholder 1: Payment reference e.g. RF49-0000-4716-6216
301
+ #. (SEPA) or +++513/7587/59959+++ (Belgium)
302
  #: includes/mollie/wc/gateway/banktransfer.php:197
 
303
  msgid "Please provide the payment reference <strong>%s</strong>"
304
  msgstr ""
305
  "Gelieve het betalingskenmerk <strong>%s</strong> op te geven bij de "
306
  "overboeking"
307
 
308
  #: includes/mollie/wc/gateway/banktransfer.php:210
 
309
  msgid "The payment will expire on <strong>%s</strong>."
310
  msgstr "De betaling zal op <strong>%s</strong> verlopen."
311
 
312
  #: includes/mollie/wc/gateway/banktransfer.php:217
 
313
  msgid ""
314
  "The payment will expire on <strong>%s</strong>. Please make sure you "
315
  "transfer the total amount before this date."
329
  msgid "Credit card"
330
  msgstr "Creditcard"
331
 
332
+ #. translators: Placeholder 1: card holder
333
  #: includes/mollie/wc/gateway/creditcard.php:56
 
334
  msgid "Payment completed by <strong>%s</strong>"
335
  msgstr "Betaling afgerond door <strong>%s</strong>"
336
 
338
  msgid "SEPA Direct Debit"
339
  msgstr "SEPA-incasso"
340
 
341
+ #: includes/mollie/wc/gateway/ideal.php:33
 
 
 
 
 
 
 
 
 
 
342
  msgid "iDEAL"
343
  msgstr "iDEAL"
344
 
345
+ #. translators: Default iDEAL description, displayed above issuer drop down
346
+ #: includes/mollie/wc/gateway/ideal.php:42
347
  msgid "Select your bank"
348
  msgstr "Selecteer uw bank"
349
 
359
  msgid "PayPal"
360
  msgstr "PayPal"
361
 
362
+ #. translators: Placeholder 1: PayPal consumer name, placeholder 2: PayPal
363
+ #. email, placeholder 3: PayPal transaction ID
364
  #: includes/mollie/wc/gateway/paypal.php:56
 
365
  msgid ""
366
  "Payment completed by <strong>%s</strong> - %s (PayPal transaction ID: %s)"
367
  msgstr ""
387
  "Ongeldige API key ingesteld. De API key moet beginnen met 'live_’ of 'test_’ "
388
  "en mag verder geen speciale tekens bevatten."
389
 
390
+ #: includes/mollie/wc/helper/data.php:563
 
391
  msgid "Item #%s stock incremented from %s to %s."
392
  msgstr "Artikel #%s voorraad verhoogd van %s naar %s."
393
 
394
+ #: includes/mollie/wc/helper/settings.php:119
395
  msgid "Error"
396
  msgstr "Fout"
397
 
398
+ #: includes/mollie/wc/helper/settings.php:129
399
  msgid "Mollie status:"
400
  msgstr "Mollie status:"
401
 
402
+ #: includes/mollie/wc/helper/settings.php:130
403
  msgid "Connected"
404
  msgstr "Verbonden"
405
 
406
+ #: includes/mollie/wc/helper/settings.php:190
407
  msgid "Gateway enabled"
408
  msgstr "Gateway ingeschakeld"
409
 
410
+ #: includes/mollie/wc/helper/settings.php:190
411
+ msgid "Enabled"
412
+ msgstr "Ingeschakeld"
413
+
414
+ #: includes/mollie/wc/helper/settings.php:191
415
  msgid "Gateway disabled"
416
  msgstr "Gateway uitgeschakeld"
417
 
418
+ #. translators: The surrounding %s's Will be replaced by a link to the Mollie
419
+ #. profile
420
  #: includes/mollie/wc/helper/settings.php:202
 
 
 
 
 
421
  msgid "The following payment methods are activated in your %sMollie profile%s:"
422
  msgstr "De volgende betaalmethodes zijn ingeschakeld in je %sMollie profiel%s:"
423
 
424
+ #: includes/mollie/wc/helper/settings.php:212
425
  msgid "Refresh"
426
  msgstr "Ververs"
427
 
428
+ #: includes/mollie/wc/helper/settings.php:236
429
  msgid "Edit"
430
  msgstr "Bewerk"
431
 
432
+ #. translators: Default payment description. {order_number} and {order_date}
433
+ #. are available tags.
434
+ #: includes/mollie/wc/helper/settings.php:267
435
  msgid "Order {order_number}"
436
  msgstr "Bestelling {order_number}"
437
 
438
+ #: includes/mollie/wc/helper/settings.php:270
439
  msgid "Log plugin events."
440
  msgstr "Log plugin events."
441
 
442
+ #: includes/mollie/wc/helper/settings.php:275
443
  msgid "View logs"
444
  msgstr "Bekijk logboeken"
445
 
446
+ #. translators: Placeholder 1: Location of the log files
447
+ #: includes/mollie/wc/helper/settings.php:281
448
  msgid "Log files are saved to <code>%s</code>"
449
  msgstr "Logboeken worden opgeslagen in <code>%s</code>"
450
 
451
+ #: includes/mollie/wc/helper/settings.php:288 includes/mollie/wc/plugin.php:281
452
  msgid "Mollie settings"
453
  msgstr "Mollie instellingen"
454
 
455
+ #: includes/mollie/wc/helper/settings.php:291
456
  msgid ""
457
  "The following options are required to use the plugin and are used by all "
458
  "Mollie payment methods"
459
  msgstr ""
460
  "De volgende instellingen zijn nodig om gebruik te maken van de Mollie plugin."
461
 
462
+ #: includes/mollie/wc/helper/settings.php:295
463
  msgid "Live API key"
464
  msgstr "Live API key"
465
 
466
+ #. translators: Placeholder 1: API key mode (live or test). The surrounding
467
+ #. %s's Will be replaced by a link to the Mollie profile
468
+ #: includes/mollie/wc/helper/settings.php:300
469
+ #: includes/mollie/wc/helper/settings.php:326
470
  msgid ""
471
  "The API key is used to connect to Mollie. You can find your <strong>%s</"
472
  "strong> API key in your %sMollie profile%s"
474
  "De API key wordt gebruikt om verbinding te maken met Mollie. Je kan je "
475
  "<strong>%s</strong> API key vinden in je %sMollie profiel%s"
476
 
477
+ #: includes/mollie/wc/helper/settings.php:306
478
  msgid "Live API key should start with live_"
479
  msgstr "Live API key moet beginnen met live_"
480
 
481
+ #: includes/mollie/wc/helper/settings.php:314
482
  msgid "Enable test mode"
483
  msgstr "Test modus inschakelen"
484
 
485
+ #: includes/mollie/wc/helper/settings.php:317
486
  msgid ""
487
  "Enable test mode if you want to test the plugin without using real payments."
488
  msgstr ""
489
  "Schakel de test modus in wanneer u de plugin wilt testen zonder echte "
490
  "betalingen te moeten doen."
491
 
492
+ #: includes/mollie/wc/helper/settings.php:321
493
  msgid "Test API key"
494
  msgstr "Test API key"
495
 
496
+ #: includes/mollie/wc/helper/settings.php:332
497
  msgid "Test API key should start with test_"
498
  msgstr "Test API key moet beginnen met test_"
499
 
500
+ #. translators: Placeholder 1: Default payment description, placeholder 2: list
501
+ #. of available tags
502
+ #: includes/mollie/wc/helper/settings.php:343
503
  msgid ""
504
  "Payment description send to Mollie. Default <code>%s</code><br/>You can use "
505
  "the following tags: %s"
507
  "Betaling beschrijving. Standaard <code>%s</code><br/> Je kunt gebruik maken "
508
  "van de volgende tags: %s"
509
 
510
+ #: includes/mollie/wc/helper/settings.php:349
511
  msgid "Payment screen language"
512
  msgstr "Taal betaalscherm"
513
 
514
+ #: includes/mollie/wc/helper/settings.php:352
515
  msgid "Detect using browser language"
516
  msgstr "Detecteren met behulp van de internet browser taal"
517
 
518
+ #. translators: Placeholder 1: Current WordPress locale
519
+ #: includes/mollie/wc/helper/settings.php:354
520
  msgid "Send WordPress language (%s)"
521
  msgstr "Stuur de WordPress taal door (%s)"
522
 
523
+ #: includes/mollie/wc/helper/settings.php:355
524
  msgid "Dutch"
525
  msgstr "Nederlands"
526
 
527
+ #: includes/mollie/wc/helper/settings.php:356
528
  msgid "Flemish (Belgium)"
529
  msgstr "Vlaams (België)"
530
 
531
+ #: includes/mollie/wc/helper/settings.php:357
532
  msgid "English"
533
  msgstr "Engels"
534
 
535
+ #: includes/mollie/wc/helper/settings.php:358
536
  msgid "German"
537
  msgstr "Duits"
538
 
539
+ #: includes/mollie/wc/helper/settings.php:359
540
  msgid "Spanish"
541
  msgstr "Spaans"
542
 
543
+ #: includes/mollie/wc/helper/settings.php:360
544
  msgid "French"
545
  msgstr "Frans"
546
 
547
+ #: includes/mollie/wc/helper/settings.php:361
548
  msgid "French (Belgium)"
549
  msgstr "Frans (België)"
550
 
551
+ #: includes/mollie/wc/helper/settings.php:367
 
 
 
 
 
 
 
 
 
 
 
 
 
552
  msgid "Debug Log"
553
  msgstr "Debug Log"
554
 
555
+ #. translators: Placeholder 1: Plugin name, placeholder 2: required WooCommerce
556
+ #. version, placeholder 3: used WooCommerce version
557
  #: includes/mollie/wc/helper/status.php:53
 
558
  msgid ""
559
  "The %s plugin requires at least WooCommerce version %s, you are using "
560
  "version %s. Please update your WooCommerce plugin."
570
  "Mollie API client niet geïnstalleerd. Zorg er voor dat de plugin juist is "
571
  "geïnstalleerd."
572
 
573
+ #. translators: Placeholder 1: Required PHP version, placeholder 2: current PHP
574
+ #. version
575
  #: includes/mollie/wc/helper/status.php:82
 
576
  msgid "The client requires PHP version >= %s, you have %s."
577
  msgstr "De API client heeft PHP versie >= %s nodig, jij gebruikt versie %s."
578
 
592
  "De Mollie API client heeft de PHP extensie cURL nodig om te werken. Schakel "
593
  "de PHP extensie ‘curl’ in."
594
 
595
+ #. translators: Placeholder 1: The required cURL function names
596
  #: includes/mollie/wc/helper/status.php:99
 
597
  msgid ""
598
  "The Mollie API client requires the following PHP cURL functions to be "
599
  "available: %s. Please make sure all of these functions are available."
601
  "De Mollie API client heeft de volgende PHP cURL functies nodig: %s. Zorg dat "
602
  "al deze functies beschikbaar zijn."
603
 
604
+ #: includes/mollie/wc/plugin.php:288
 
 
 
 
 
605
  msgid "Logs"
606
  msgstr "Logboeken"
607
 
608
  #: mollie-payments-for-woocommerce.php:49
 
609
  msgid "Could not activate plugin %s"
610
  msgstr "Kan plugin %s niet activeren"
611
 
612
+ #: mollie-payments-for-woocommerce.php:93
 
613
  msgid "%s deactivated because it depends on WooCommerce."
614
  msgstr "%s gedeactiveerd omdat het afhankelijk is van de plugin WooCommerce."
615
 
616
+ #. Plugin Name of the plugin/theme
617
+ msgid "Mollie Payments for WooCommerce"
618
+ msgstr "Mollie Payments for WooCommerce"
619
 
620
+ #. Plugin URI of the plugin/theme
621
+ msgid "https://github.com/mollie/WooCommerce"
622
+ msgstr "https://github.com/mollie/WooCommerce"
623
 
624
+ #. Description of the plugin/theme
625
+ msgid "Accept payments in WooCommerce with the official Mollie plugin"
626
+ msgstr "Accepteer betalingen in WooCommerce met de officiële Mollie plugin"
627
 
628
+ #. Author of the plugin/theme
629
+ msgid "Mollie"
630
+ msgstr "Mollie"
631
 
632
+ #. Author URI of the plugin/theme
633
+ msgid "https://www.mollie.com"
634
+ msgstr "https://www.mollie.com"
635
 
636
  #~ msgid ""
637
  #~ "Accept payments in WooCommerce with the official Mollie plugin for iDEAL, "
i18n/languages/mollie-payments-for-woocommerce.pot CHANGED
@@ -1,211 +1,191 @@
1
  # Copyright (C) 2016 Mollie Payments for WooCommerce
2
  # This file is distributed under the same license as the Mollie Payments for WooCommerce package.
3
- #, fuzzy
4
  msgid ""
5
  msgstr ""
6
  "Project-Id-Version: Mollie Payments for WooCommerce 2.3.1\n"
7
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mollie-payments-"
8
  "for-woocommerce\n"
9
- "POT-Creation-Date: 2017-03-07 10:43+0100\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
  "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
14
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15
  "Language-Team: LANGUAGE <LL@li.org>\n"
16
- "X-Generator: Poedit 1.8.11\n"
17
- "X-Poedit-Basepath: ../..\n"
18
- "X-Poedit-KeywordsList: __\n"
19
- "X-Poedit-SearchPath-0: .\n"
20
 
21
- #: includes/mollie/wc/gateway/abstract.php:86
22
  msgid "Enable/Disable"
23
  msgstr ""
24
 
25
- #: includes/mollie/wc/gateway/abstract.php:88
26
- #, php-format
27
  msgid "Enable %s"
28
  msgstr ""
29
 
30
- #: includes/mollie/wc/gateway/abstract.php:92
31
  msgid "Title"
32
  msgstr ""
33
 
34
- #: includes/mollie/wc/gateway/abstract.php:94
35
- #, php-format
36
  msgid ""
37
  "This controls the title which the user sees during checkout. Default <code>"
38
  "%s</code>"
39
  msgstr ""
40
 
41
- #: includes/mollie/wc/gateway/abstract.php:99
42
  msgid "Display logo"
43
  msgstr ""
44
 
45
- #: includes/mollie/wc/gateway/abstract.php:101
46
  msgid "Display logo on checkout page. Default <code>enabled</code>"
47
  msgstr ""
48
 
49
- #: includes/mollie/wc/gateway/abstract.php:105
50
- #: includes/mollie/wc/helper/settings.php:351
51
  msgid "Description"
52
  msgstr ""
53
 
54
- #: includes/mollie/wc/gateway/abstract.php:107
55
- #, php-format
56
  msgid ""
57
  "Payment method description that the customer will see on your checkout. "
58
  "Default <code>%s</code>"
59
  msgstr ""
60
 
61
- #: includes/mollie/wc/gateway/abstract.php:116
62
  msgid "Initial order status"
63
  msgstr ""
64
 
65
- #: includes/mollie/wc/gateway/abstract.php:119
66
- #: includes/mollie/wc/helper/settings.php:365
67
  msgid "default"
68
  msgstr ""
69
 
70
- #: includes/mollie/wc/gateway/abstract.php:125
71
- #, php-format
 
72
  msgid ""
73
  "Some payment methods take longer than a few hours to complete. The initial "
74
  "order state is then set to '%s'. This ensures the order is not cancelled "
75
  "when the setting %s is used."
76
  msgstr ""
77
 
78
- #: includes/mollie/wc/gateway/abstract.php:127
79
  msgid "Hold Stock (minutes)"
80
  msgstr ""
81
 
82
- #: includes/mollie/wc/gateway/abstract.php:170
83
- msgid "Gateway Disabled"
 
 
84
  msgstr ""
85
 
86
- #: includes/mollie/wc/gateway/abstract.php:193
87
- #: includes/mollie/wc/helper/settings.php:208
88
- msgid "Test mode enabled."
89
  msgstr ""
90
 
91
- #: includes/mollie/wc/gateway/abstract.php:195
92
- #, php-format
 
93
  msgid "No API key provided. Please %sset you Mollie API key%s first."
94
  msgstr ""
95
 
96
- #: includes/mollie/wc/gateway/abstract.php:207
97
- #, php-format
 
98
  msgid ""
99
  "%s not enabled in your Mollie profile. You can enabled it by editing your "
100
  "%sMollie profile%s."
101
  msgstr ""
102
 
103
- #: includes/mollie/wc/gateway/abstract.php:220
104
- #, php-format
 
105
  msgid "Shop currency %s not supported by Mollie. Mollie only supports: %s."
106
  msgstr ""
107
 
108
- #: includes/mollie/wc/gateway/abstract.php:287
109
- #: includes/mollie/wc/gateway/abstractsubscription.php:136
110
- #, php-format
111
  msgid "Could not load order %s"
112
  msgstr ""
113
 
114
- #: includes/mollie/wc/gateway/abstract.php:345
115
- #: includes/mollie/wc/gateway/abstractsubscription.php:386
116
  msgid "Awaiting payment confirmation."
117
  msgstr ""
118
 
119
- #: includes/mollie/wc/gateway/abstract.php:350
120
- #: includes/mollie/wc/gateway/abstractseparecurring.php:68
121
- #: includes/mollie/wc/gateway/abstractsubscription.php:391
122
- #, php-format
123
  msgid "%s payment started (%s)."
124
  msgstr ""
125
 
126
- #: includes/mollie/wc/gateway/abstract.php:352
 
127
  #: includes/mollie/wc/gateway/abstract.php:605
128
- #: includes/mollie/wc/gateway/abstract.php:659
129
- #: includes/mollie/wc/gateway/abstract.php:709
130
- #: includes/mollie/wc/gateway/abstract.php:739
131
- #: includes/mollie/wc/gateway/abstractseparecurring.php:70
132
- #: includes/mollie/wc/gateway/abstractseparecurring.php:177
133
- #: includes/mollie/wc/gateway/abstractsubscription.php:393
134
  msgid "test mode"
135
  msgstr ""
136
 
137
- #: includes/mollie/wc/gateway/abstract.php:367
138
- #: includes/mollie/wc/gateway/abstractsubscription.php:223
139
- #, php-format
140
  msgid "Could not create %s payment."
141
  msgstr ""
142
 
143
- #: includes/mollie/wc/gateway/abstract.php:602
144
- #, php-format
 
145
  msgid "%s payment %s (%s)."
146
  msgstr ""
147
 
148
- #: includes/mollie/wc/gateway/abstract.php:657
149
- #: includes/mollie/wc/gateway/abstractseparecurring.php:175
150
- #, php-format
151
  msgid "Order completed using %s payment (%s)."
152
  msgstr ""
153
 
154
- #: includes/mollie/wc/gateway/abstract.php:707
155
- #, php-format
156
  msgid "%s payment cancelled (%s)."
157
  msgstr ""
158
 
159
- #: includes/mollie/wc/gateway/abstract.php:737
160
- #, php-format
161
  msgid "%s payment expired (%s)."
162
  msgstr ""
163
 
164
- #: includes/mollie/wc/gateway/abstract.php:753
165
  msgid ""
166
  "You have cancelled your payment. Please complete your order with a different "
167
  "payment method."
168
  msgstr ""
169
 
170
- #: includes/mollie/wc/gateway/abstract.php:830
171
- #, php-format
 
 
172
  msgid "Refunded %s%s (reason: %s) - Payment ID: %s, Refund: %s"
173
  msgstr ""
174
 
175
- #: includes/mollie/wc/gateway/abstract.php:904
176
  msgid "Payment"
177
  msgstr ""
178
 
179
- #: includes/mollie/wc/gateway/abstract.php:925
180
  msgid "We have not received a definite payment status."
181
  msgstr ""
182
 
183
- #: includes/mollie/wc/gateway/abstract.php:930
184
  msgid ""
185
  "We have not received a definite payment status. You will receive an email as "
186
  "soon as we receive a confirmation of the bank/merchant."
187
  msgstr ""
188
 
189
- #: includes/mollie/wc/gateway/abstract.php:937
190
- #, php-format
191
  msgid "Payment completed with <strong>%s</strong>"
192
  msgstr ""
193
 
194
- #: includes/mollie/wc/gateway/abstractseparecurring.php:60
195
- #, php-format
196
- msgid "Awaiting payment confirmation. For %s Days"
197
- msgstr ""
198
-
199
- #: includes/mollie/wc/gateway/abstractsubscription.php:183
200
- msgid "Payment cannot be processed."
201
- msgstr ""
202
-
203
  #: includes/mollie/wc/gateway/banktransfer.php:32
204
  msgid "Expiry date"
205
  msgstr ""
206
 
207
  #: includes/mollie/wc/gateway/banktransfer.php:34
208
- #, php-format
209
  msgid ""
210
  "Number of days after the payment will expire. Default <code>%d</code> days"
211
  msgstr ""
@@ -230,17 +210,16 @@ msgstr ""
230
  msgid "Mail payment instructions"
231
  msgstr ""
232
 
 
233
  #: includes/mollie/wc/gateway/banktransfer.php:52
234
- #, php-format
235
  msgid ""
236
  "Should Mollie automatically mail the payment instructions to the customer? "
237
  "Default <code>%s</code>"
238
  msgstr ""
239
 
240
  #: includes/mollie/wc/gateway/banktransfer.php:52
241
- #: includes/mollie/wc/helper/settings.php:201
242
- #: includes/mollie/wc/helper/settings.php:380
243
- msgid "Enabled"
244
  msgstr ""
245
 
246
  #: includes/mollie/wc/gateway/banktransfer.php:55
@@ -253,11 +232,12 @@ msgstr ""
253
  msgid "Bank Transfer"
254
  msgstr ""
255
 
 
 
256
  #: includes/mollie/wc/gateway/banktransfer.php:171
257
  #: includes/mollie/wc/gateway/directdebit.php:51
258
- #: includes/mollie/wc/gateway/ideal.php:104
259
  #: includes/mollie/wc/gateway/sofort.php:56
260
- #, php-format
261
  msgid "Payment completed by <strong>%s</strong> (IBAN: %s, BIC: %s)"
262
  msgstr ""
263
 
@@ -267,38 +247,36 @@ msgid ""
267
  "following bank account:"
268
  msgstr ""
269
 
 
270
  #: includes/mollie/wc/gateway/banktransfer.php:185
271
- #, php-format
272
  msgid "Beneficiary: %s"
273
  msgstr ""
274
 
275
  #: includes/mollie/wc/gateway/banktransfer.php:186
276
- #, php-format
277
  msgid "IBAN: <strong>%s</strong>"
278
  msgstr ""
279
 
280
  #: includes/mollie/wc/gateway/banktransfer.php:187
281
- #, php-format
282
  msgid "BIC: %s"
283
  msgstr ""
284
 
 
 
285
  #: includes/mollie/wc/gateway/banktransfer.php:192
286
- #, php-format
287
  msgid "Payment reference: %s"
288
  msgstr ""
289
 
 
 
290
  #: includes/mollie/wc/gateway/banktransfer.php:197
291
- #, php-format
292
  msgid "Please provide the payment reference <strong>%s</strong>"
293
  msgstr ""
294
 
295
  #: includes/mollie/wc/gateway/banktransfer.php:210
296
- #, php-format
297
  msgid "The payment will expire on <strong>%s</strong>."
298
  msgstr ""
299
 
300
  #: includes/mollie/wc/gateway/banktransfer.php:217
301
- #, php-format
302
  msgid ""
303
  "The payment will expire on <strong>%s</strong>. Please make sure you "
304
  "transfer the total amount before this date."
@@ -316,8 +294,8 @@ msgstr ""
316
  msgid "Credit card"
317
  msgstr ""
318
 
 
319
  #: includes/mollie/wc/gateway/creditcard.php:56
320
- #, php-format
321
  msgid "Payment completed by <strong>%s</strong>"
322
  msgstr ""
323
 
@@ -325,21 +303,12 @@ msgstr ""
325
  msgid "SEPA Direct Debit"
326
  msgstr ""
327
 
328
- #: includes/mollie/wc/gateway/ideal.php:29
329
- msgid "Issuers empty option"
330
- msgstr ""
331
-
332
- #: includes/mollie/wc/gateway/ideal.php:31
333
- msgid ""
334
- "This text will be displayed as the first option in the iDEAL issuers drop "
335
- "down"
336
- msgstr ""
337
-
338
- #: includes/mollie/wc/gateway/ideal.php:51
339
  msgid "iDEAL"
340
  msgstr ""
341
 
342
- #: includes/mollie/wc/gateway/ideal.php:60
 
343
  msgid "Select your bank"
344
  msgstr ""
345
 
@@ -355,8 +324,9 @@ msgstr ""
355
  msgid "PayPal"
356
  msgstr ""
357
 
 
 
358
  #: includes/mollie/wc/gateway/paypal.php:56
359
- #, php-format
360
  msgid ""
361
  "Payment completed by <strong>%s</strong> - %s (PayPal transaction ID: %s)"
362
  msgstr ""
@@ -379,173 +349,168 @@ msgid ""
379
  "further contain any special characters."
380
  msgstr ""
381
 
382
- #: includes/mollie/wc/helper/data.php:636
383
- #, php-format
384
  msgid "Item #%s stock incremented from %s to %s."
385
  msgstr ""
386
 
387
- #: includes/mollie/wc/helper/settings.php:130
388
  msgid "Error"
389
  msgstr ""
390
 
391
- #: includes/mollie/wc/helper/settings.php:140
392
  msgid "Mollie status:"
393
  msgstr ""
394
 
395
- #: includes/mollie/wc/helper/settings.php:141
396
  msgid "Connected"
397
  msgstr ""
398
 
399
- #: includes/mollie/wc/helper/settings.php:201
400
  msgid "Gateway enabled"
401
  msgstr ""
402
 
403
- #: includes/mollie/wc/helper/settings.php:202
404
- msgid "Gateway disabled"
405
  msgstr ""
406
 
407
- #: includes/mollie/wc/helper/settings.php:202
408
- msgid "Disabled"
409
  msgstr ""
410
 
411
- #: includes/mollie/wc/helper/settings.php:213
412
- #, php-format
 
413
  msgid "The following payment methods are activated in your %sMollie profile%s:"
414
  msgstr ""
415
 
416
- #: includes/mollie/wc/helper/settings.php:223
417
  msgid "Refresh"
418
  msgstr ""
419
 
420
- #: includes/mollie/wc/helper/settings.php:247
421
  msgid "Edit"
422
  msgstr ""
423
 
424
- #: includes/mollie/wc/helper/settings.php:278
 
 
425
  msgid "Order {order_number}"
426
  msgstr ""
427
 
428
- #: includes/mollie/wc/helper/settings.php:281
429
  msgid "Log plugin events."
430
  msgstr ""
431
 
432
- #: includes/mollie/wc/helper/settings.php:286
433
  msgid "View logs"
434
  msgstr ""
435
 
436
- #: includes/mollie/wc/helper/settings.php:292
437
- #, php-format
438
  msgid "Log files are saved to <code>%s</code>"
439
  msgstr ""
440
 
441
- #: includes/mollie/wc/helper/settings.php:299 includes/mollie/wc/plugin.php:374
 
442
  msgid "Mollie settings"
443
  msgstr ""
444
 
445
- #: includes/mollie/wc/helper/settings.php:302
446
  msgid ""
447
  "The following options are required to use the plugin and are used by all "
448
  "Mollie payment methods"
449
  msgstr ""
450
 
451
- #: includes/mollie/wc/helper/settings.php:306
452
  msgid "Live API key"
453
  msgstr ""
454
 
455
- #: includes/mollie/wc/helper/settings.php:311
456
- #: includes/mollie/wc/helper/settings.php:337
457
- #, php-format
 
458
  msgid ""
459
  "The API key is used to connect to Mollie. You can find your <strong>%s</"
460
  "strong> API key in your %sMollie profile%s"
461
  msgstr ""
462
 
463
- #: includes/mollie/wc/helper/settings.php:317
464
  msgid "Live API key should start with live_"
465
  msgstr ""
466
 
467
- #: includes/mollie/wc/helper/settings.php:325
468
  msgid "Enable test mode"
469
  msgstr ""
470
 
471
- #: includes/mollie/wc/helper/settings.php:328
472
  msgid ""
473
  "Enable test mode if you want to test the plugin without using real payments."
474
  msgstr ""
475
 
476
- #: includes/mollie/wc/helper/settings.php:332
477
  msgid "Test API key"
478
  msgstr ""
479
 
480
- #: includes/mollie/wc/helper/settings.php:343
481
  msgid "Test API key should start with test_"
482
  msgstr ""
483
 
484
- #: includes/mollie/wc/helper/settings.php:354
485
- #, php-format
 
486
  msgid ""
487
  "Payment description send to Mollie. Default <code>%s</code><br/>You can use "
488
  "the following tags: %s"
489
  msgstr ""
490
 
491
- #: includes/mollie/wc/helper/settings.php:360
492
  msgid "Payment screen language"
493
  msgstr ""
494
 
495
- #: includes/mollie/wc/helper/settings.php:363
496
  msgid "Detect using browser language"
497
  msgstr ""
498
 
499
- #: includes/mollie/wc/helper/settings.php:365
500
- #, php-format
501
  msgid "Send WordPress language (%s)"
502
  msgstr ""
503
 
504
- #: includes/mollie/wc/helper/settings.php:366
505
  msgid "Dutch"
506
  msgstr ""
507
 
508
- #: includes/mollie/wc/helper/settings.php:367
509
  msgid "Flemish (Belgium)"
510
  msgstr ""
511
 
512
- #: includes/mollie/wc/helper/settings.php:368
513
  msgid "English"
514
  msgstr ""
515
 
516
- #: includes/mollie/wc/helper/settings.php:369
517
  msgid "German"
518
  msgstr ""
519
 
520
- #: includes/mollie/wc/helper/settings.php:370
521
  msgid "Spanish"
522
  msgstr ""
523
 
524
- #: includes/mollie/wc/helper/settings.php:371
525
  msgid "French"
526
  msgstr ""
527
 
528
- #: includes/mollie/wc/helper/settings.php:372
529
  msgid "French (Belgium)"
530
  msgstr ""
531
 
532
- #: includes/mollie/wc/helper/settings.php:378
533
- msgid "Store customer details at Mollie"
534
- msgstr ""
535
-
536
- #: includes/mollie/wc/helper/settings.php:380
537
- #, php-format
538
- msgid ""
539
- "Should Mollie store customers name and email address for Single Click "
540
- "Payments? Default <code>%s</code>"
541
- msgstr ""
542
-
543
- #: includes/mollie/wc/helper/settings.php:387
544
  msgid "Debug Log"
545
  msgstr ""
546
 
 
 
547
  #: includes/mollie/wc/helper/status.php:53
548
- #, php-format
549
  msgid ""
550
  "The %s plugin requires at least WooCommerce version %s, you are using "
551
  "version %s. Please update your WooCommerce plugin."
@@ -557,8 +522,9 @@ msgid ""
557
  "correctly."
558
  msgstr ""
559
 
 
 
560
  #: includes/mollie/wc/helper/status.php:82
561
- #, php-format
562
  msgid "The client requires PHP version >= %s, you have %s."
563
  msgstr ""
564
 
@@ -574,28 +540,41 @@ msgid ""
574
  "enable the 'curl' extension in your PHP configuration."
575
  msgstr ""
576
 
 
577
  #: includes/mollie/wc/helper/status.php:99
578
- #, php-format
579
  msgid ""
580
  "The Mollie API client requires the following PHP cURL functions to be "
581
  "available: %s. Please make sure all of these functions are available."
582
  msgstr ""
583
 
584
- #: includes/mollie/wc/plugin.php:101
585
- #, php-format
586
- msgid "%s payment failed (%s)."
587
- msgstr ""
588
-
589
- #: includes/mollie/wc/plugin.php:381
590
  msgid "Logs"
591
  msgstr ""
592
 
593
  #: mollie-payments-for-woocommerce.php:49
594
- #, php-format
595
  msgid "Could not activate plugin %s"
596
  msgstr ""
597
 
598
- #: mollie-payments-for-woocommerce.php:97
599
- #, php-format
600
  msgid "%s deactivated because it depends on WooCommerce."
601
  msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  # Copyright (C) 2016 Mollie Payments for WooCommerce
2
  # This file is distributed under the same license as the Mollie Payments for WooCommerce package.
 
3
  msgid ""
4
  msgstr ""
5
  "Project-Id-Version: Mollie Payments for WooCommerce 2.3.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mollie-payments-"
7
  "for-woocommerce\n"
8
+ "POT-Creation-Date: 2016-10-06 11:56:29+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
 
 
 
 
15
 
16
+ #: includes/mollie/wc/gateway/abstract.php:83
17
  msgid "Enable/Disable"
18
  msgstr ""
19
 
20
+ #: includes/mollie/wc/gateway/abstract.php:85
 
21
  msgid "Enable %s"
22
  msgstr ""
23
 
24
+ #: includes/mollie/wc/gateway/abstract.php:89
25
  msgid "Title"
26
  msgstr ""
27
 
28
+ #: includes/mollie/wc/gateway/abstract.php:91
 
29
  msgid ""
30
  "This controls the title which the user sees during checkout. Default <code>"
31
  "%s</code>"
32
  msgstr ""
33
 
34
+ #: includes/mollie/wc/gateway/abstract.php:96
35
  msgid "Display logo"
36
  msgstr ""
37
 
38
+ #: includes/mollie/wc/gateway/abstract.php:98
39
  msgid "Display logo on checkout page. Default <code>enabled</code>"
40
  msgstr ""
41
 
42
+ #: includes/mollie/wc/gateway/abstract.php:102
43
+ #: includes/mollie/wc/helper/settings.php:340
44
  msgid "Description"
45
  msgstr ""
46
 
47
+ #: includes/mollie/wc/gateway/abstract.php:104
 
48
  msgid ""
49
  "Payment method description that the customer will see on your checkout. "
50
  "Default <code>%s</code>"
51
  msgstr ""
52
 
53
+ #: includes/mollie/wc/gateway/abstract.php:113
54
  msgid "Initial order status"
55
  msgstr ""
56
 
57
+ #: includes/mollie/wc/gateway/abstract.php:116
58
+ #: includes/mollie/wc/helper/settings.php:354
59
  msgid "default"
60
  msgstr ""
61
 
62
+ #. translators: Placeholder 1: Default order status, placeholder 2: Link to
63
+ #. 'Hold Stock' setting
64
+ #: includes/mollie/wc/gateway/abstract.php:122
65
  msgid ""
66
  "Some payment methods take longer than a few hours to complete. The initial "
67
  "order state is then set to '%s'. This ensures the order is not cancelled "
68
  "when the setting %s is used."
69
  msgstr ""
70
 
71
+ #: includes/mollie/wc/gateway/abstract.php:124
72
  msgid "Hold Stock (minutes)"
73
  msgstr ""
74
 
75
+ #: includes/mollie/wc/gateway/abstract.php:153
76
+ #: includes/mollie/wc/gateway/abstract.php:197
77
+ #: includes/mollie/wc/helper/settings.php:197
78
+ msgid "Test mode enabled."
79
  msgstr ""
80
 
81
+ #: includes/mollie/wc/gateway/abstract.php:174
82
+ msgid "Gateway Disabled"
 
83
  msgstr ""
84
 
85
+ #. translators: The surrounding %s's Will be replaced by a link to the global
86
+ #. setting page
87
+ #: includes/mollie/wc/gateway/abstract.php:199
88
  msgid "No API key provided. Please %sset you Mollie API key%s first."
89
  msgstr ""
90
 
91
+ #. translators: Placeholder 1: payment method title. The surrounding %s's Will
92
+ #. be replaced by a link to the Mollie profile
93
+ #: includes/mollie/wc/gateway/abstract.php:211
94
  msgid ""
95
  "%s not enabled in your Mollie profile. You can enabled it by editing your "
96
  "%sMollie profile%s."
97
  msgstr ""
98
 
99
+ #. translators: Placeholder 1: WooCommerce currency, placeholder 2: Supported
100
+ #. Mollie currencies
101
+ #: includes/mollie/wc/gateway/abstract.php:224
102
  msgid "Shop currency %s not supported by Mollie. Mollie only supports: %s."
103
  msgstr ""
104
 
105
+ #: includes/mollie/wc/gateway/abstract.php:291
 
 
106
  msgid "Could not load order %s"
107
  msgstr ""
108
 
109
+ #: includes/mollie/wc/gateway/abstract.php:386
 
110
  msgid "Awaiting payment confirmation."
111
  msgstr ""
112
 
113
+ #. translators: Placeholder 1: Payment method title, placeholder 2: payment ID
114
+ #: includes/mollie/wc/gateway/abstract.php:391
 
 
115
  msgid "%s payment started (%s)."
116
  msgstr ""
117
 
118
+ #: includes/mollie/wc/gateway/abstract.php:393
119
+ #: includes/mollie/wc/gateway/abstract.php:574
120
  #: includes/mollie/wc/gateway/abstract.php:605
121
+ #: includes/mollie/wc/gateway/abstract.php:639
122
+ #: includes/mollie/wc/gateway/abstract.php:667
 
 
 
 
123
  msgid "test mode"
124
  msgstr ""
125
 
126
+ #. translators: Placeholder 1: Payment method title
127
+ #: includes/mollie/wc/gateway/abstract.php:411
 
128
  msgid "Could not create %s payment."
129
  msgstr ""
130
 
131
+ #. translators: Placeholder 1: payment method title, placeholder 2: payment
132
+ #. status, placeholder 3: payment ID
133
+ #: includes/mollie/wc/gateway/abstract.php:571
134
  msgid "%s payment %s (%s)."
135
  msgstr ""
136
 
137
+ #. translators: Placeholder 1: payment method title, placeholder 2: payment ID
138
+ #: includes/mollie/wc/gateway/abstract.php:603
 
139
  msgid "Order completed using %s payment (%s)."
140
  msgstr ""
141
 
142
+ #. translators: Placeholder 1: payment method title, placeholder 2: payment ID
143
+ #: includes/mollie/wc/gateway/abstract.php:637
144
  msgid "%s payment cancelled (%s)."
145
  msgstr ""
146
 
147
+ #. translators: Placeholder 1: payment method title, placeholder 2: payment ID
148
+ #: includes/mollie/wc/gateway/abstract.php:665
149
  msgid "%s payment expired (%s)."
150
  msgstr ""
151
 
152
+ #: includes/mollie/wc/gateway/abstract.php:681
153
  msgid ""
154
  "You have cancelled your payment. Please complete your order with a different "
155
  "payment method."
156
  msgstr ""
157
 
158
+ #. translators: Placeholder 1: currency, placeholder 2: refunded amount,
159
+ #. placeholder 3: optional refund reason, placeholder 4: payment ID,
160
+ #. placeholder 5: refund ID
161
+ #: includes/mollie/wc/gateway/abstract.php:758
162
  msgid "Refunded %s%s (reason: %s) - Payment ID: %s, Refund: %s"
163
  msgstr ""
164
 
165
+ #: includes/mollie/wc/gateway/abstract.php:827
166
  msgid "Payment"
167
  msgstr ""
168
 
169
+ #: includes/mollie/wc/gateway/abstract.php:848
170
  msgid "We have not received a definite payment status."
171
  msgstr ""
172
 
173
+ #: includes/mollie/wc/gateway/abstract.php:853
174
  msgid ""
175
  "We have not received a definite payment status. You will receive an email as "
176
  "soon as we receive a confirmation of the bank/merchant."
177
  msgstr ""
178
 
179
+ #. translators: Placeholder 1: payment method
180
+ #: includes/mollie/wc/gateway/abstract.php:860
181
  msgid "Payment completed with <strong>%s</strong>"
182
  msgstr ""
183
 
 
 
 
 
 
 
 
 
 
184
  #: includes/mollie/wc/gateway/banktransfer.php:32
185
  msgid "Expiry date"
186
  msgstr ""
187
 
188
  #: includes/mollie/wc/gateway/banktransfer.php:34
 
189
  msgid ""
190
  "Number of days after the payment will expire. Default <code>%d</code> days"
191
  msgstr ""
210
  msgid "Mail payment instructions"
211
  msgstr ""
212
 
213
+ #. translators: Placeholder 1: enabled or disabled
214
  #: includes/mollie/wc/gateway/banktransfer.php:52
 
215
  msgid ""
216
  "Should Mollie automatically mail the payment instructions to the customer? "
217
  "Default <code>%s</code>"
218
  msgstr ""
219
 
220
  #: includes/mollie/wc/gateway/banktransfer.php:52
221
+ #: includes/mollie/wc/helper/settings.php:191
222
+ msgid "Disabled"
 
223
  msgstr ""
224
 
225
  #: includes/mollie/wc/gateway/banktransfer.php:55
232
  msgid "Bank Transfer"
233
  msgstr ""
234
 
235
+ #. translators: Placeholder 1: consumer name, placeholder 2: consumer IBAN,
236
+ #. placeholder 3: consumer BIC
237
  #: includes/mollie/wc/gateway/banktransfer.php:171
238
  #: includes/mollie/wc/gateway/directdebit.php:51
239
+ #: includes/mollie/wc/gateway/ideal.php:86
240
  #: includes/mollie/wc/gateway/sofort.php:56
 
241
  msgid "Payment completed by <strong>%s</strong> (IBAN: %s, BIC: %s)"
242
  msgstr ""
243
 
247
  "following bank account:"
248
  msgstr ""
249
 
250
+ #. translators: Placeholder 1: 'Stichting Mollie Payments'
251
  #: includes/mollie/wc/gateway/banktransfer.php:185
 
252
  msgid "Beneficiary: %s"
253
  msgstr ""
254
 
255
  #: includes/mollie/wc/gateway/banktransfer.php:186
 
256
  msgid "IBAN: <strong>%s</strong>"
257
  msgstr ""
258
 
259
  #: includes/mollie/wc/gateway/banktransfer.php:187
 
260
  msgid "BIC: %s"
261
  msgstr ""
262
 
263
+ #. translators: Placeholder 1: Payment reference e.g. RF49-0000-4716-6216
264
+ #. (SEPA) or +++513/7587/59959+++ (Belgium)
265
  #: includes/mollie/wc/gateway/banktransfer.php:192
 
266
  msgid "Payment reference: %s"
267
  msgstr ""
268
 
269
+ #. translators: Placeholder 1: Payment reference e.g. RF49-0000-4716-6216
270
+ #. (SEPA) or +++513/7587/59959+++ (Belgium)
271
  #: includes/mollie/wc/gateway/banktransfer.php:197
 
272
  msgid "Please provide the payment reference <strong>%s</strong>"
273
  msgstr ""
274
 
275
  #: includes/mollie/wc/gateway/banktransfer.php:210
 
276
  msgid "The payment will expire on <strong>%s</strong>."
277
  msgstr ""
278
 
279
  #: includes/mollie/wc/gateway/banktransfer.php:217
 
280
  msgid ""
281
  "The payment will expire on <strong>%s</strong>. Please make sure you "
282
  "transfer the total amount before this date."
294
  msgid "Credit card"
295
  msgstr ""
296
 
297
+ #. translators: Placeholder 1: card holder
298
  #: includes/mollie/wc/gateway/creditcard.php:56
 
299
  msgid "Payment completed by <strong>%s</strong>"
300
  msgstr ""
301
 
303
  msgid "SEPA Direct Debit"
304
  msgstr ""
305
 
306
+ #: includes/mollie/wc/gateway/ideal.php:33
 
 
 
 
 
 
 
 
 
 
307
  msgid "iDEAL"
308
  msgstr ""
309
 
310
+ #. translators: Default iDEAL description, displayed above issuer drop down
311
+ #: includes/mollie/wc/gateway/ideal.php:42
312
  msgid "Select your bank"
313
  msgstr ""
314
 
324
  msgid "PayPal"
325
  msgstr ""
326
 
327
+ #. translators: Placeholder 1: PayPal consumer name, placeholder 2: PayPal
328
+ #. email, placeholder 3: PayPal transaction ID
329
  #: includes/mollie/wc/gateway/paypal.php:56
 
330
  msgid ""
331
  "Payment completed by <strong>%s</strong> - %s (PayPal transaction ID: %s)"
332
  msgstr ""
349
  "further contain any special characters."
350
  msgstr ""
351
 
352
+ #: includes/mollie/wc/helper/data.php:563
 
353
  msgid "Item #%s stock incremented from %s to %s."
354
  msgstr ""
355
 
356
+ #: includes/mollie/wc/helper/settings.php:119
357
  msgid "Error"
358
  msgstr ""
359
 
360
+ #: includes/mollie/wc/helper/settings.php:129
361
  msgid "Mollie status:"
362
  msgstr ""
363
 
364
+ #: includes/mollie/wc/helper/settings.php:130
365
  msgid "Connected"
366
  msgstr ""
367
 
368
+ #: includes/mollie/wc/helper/settings.php:190
369
  msgid "Gateway enabled"
370
  msgstr ""
371
 
372
+ #: includes/mollie/wc/helper/settings.php:190
373
+ msgid "Enabled"
374
  msgstr ""
375
 
376
+ #: includes/mollie/wc/helper/settings.php:191
377
+ msgid "Gateway disabled"
378
  msgstr ""
379
 
380
+ #. translators: The surrounding %s's Will be replaced by a link to the Mollie
381
+ #. profile
382
+ #: includes/mollie/wc/helper/settings.php:202
383
  msgid "The following payment methods are activated in your %sMollie profile%s:"
384
  msgstr ""
385
 
386
+ #: includes/mollie/wc/helper/settings.php:212
387
  msgid "Refresh"
388
  msgstr ""
389
 
390
+ #: includes/mollie/wc/helper/settings.php:236
391
  msgid "Edit"
392
  msgstr ""
393
 
394
+ #. translators: Default payment description. {order_number} and {order_date}
395
+ #. are available tags.
396
+ #: includes/mollie/wc/helper/settings.php:267
397
  msgid "Order {order_number}"
398
  msgstr ""
399
 
400
+ #: includes/mollie/wc/helper/settings.php:270
401
  msgid "Log plugin events."
402
  msgstr ""
403
 
404
+ #: includes/mollie/wc/helper/settings.php:275
405
  msgid "View logs"
406
  msgstr ""
407
 
408
+ #. translators: Placeholder 1: Location of the log files
409
+ #: includes/mollie/wc/helper/settings.php:281
410
  msgid "Log files are saved to <code>%s</code>"
411
  msgstr ""
412
 
413
+ #: includes/mollie/wc/helper/settings.php:288
414
+ #: includes/mollie/wc/plugin.php:281
415
  msgid "Mollie settings"
416
  msgstr ""
417
 
418
+ #: includes/mollie/wc/helper/settings.php:291
419
  msgid ""
420
  "The following options are required to use the plugin and are used by all "
421
  "Mollie payment methods"
422
  msgstr ""
423
 
424
+ #: includes/mollie/wc/helper/settings.php:295
425
  msgid "Live API key"
426
  msgstr ""
427
 
428
+ #. translators: Placeholder 1: API key mode (live or test). The surrounding
429
+ #. %s's Will be replaced by a link to the Mollie profile
430
+ #: includes/mollie/wc/helper/settings.php:300
431
+ #: includes/mollie/wc/helper/settings.php:326
432
  msgid ""
433
  "The API key is used to connect to Mollie. You can find your <strong>%s</"
434
  "strong> API key in your %sMollie profile%s"
435
  msgstr ""
436
 
437
+ #: includes/mollie/wc/helper/settings.php:306
438
  msgid "Live API key should start with live_"
439
  msgstr ""
440
 
441
+ #: includes/mollie/wc/helper/settings.php:314
442
  msgid "Enable test mode"
443
  msgstr ""
444
 
445
+ #: includes/mollie/wc/helper/settings.php:317
446
  msgid ""
447
  "Enable test mode if you want to test the plugin without using real payments."
448
  msgstr ""
449
 
450
+ #: includes/mollie/wc/helper/settings.php:321
451
  msgid "Test API key"
452
  msgstr ""
453
 
454
+ #: includes/mollie/wc/helper/settings.php:332
455
  msgid "Test API key should start with test_"
456
  msgstr ""
457
 
458
+ #. translators: Placeholder 1: Default payment description, placeholder 2: list
459
+ #. of available tags
460
+ #: includes/mollie/wc/helper/settings.php:343
461
  msgid ""
462
  "Payment description send to Mollie. Default <code>%s</code><br/>You can use "
463
  "the following tags: %s"
464
  msgstr ""
465
 
466
+ #: includes/mollie/wc/helper/settings.php:349
467
  msgid "Payment screen language"
468
  msgstr ""
469
 
470
+ #: includes/mollie/wc/helper/settings.php:352
471
  msgid "Detect using browser language"
472
  msgstr ""
473
 
474
+ #. translators: Placeholder 1: Current WordPress locale
475
+ #: includes/mollie/wc/helper/settings.php:354
476
  msgid "Send WordPress language (%s)"
477
  msgstr ""
478
 
479
+ #: includes/mollie/wc/helper/settings.php:355
480
  msgid "Dutch"
481
  msgstr ""
482
 
483
+ #: includes/mollie/wc/helper/settings.php:356
484
  msgid "Flemish (Belgium)"
485
  msgstr ""
486
 
487
+ #: includes/mollie/wc/helper/settings.php:357
488
  msgid "English"
489
  msgstr ""
490
 
491
+ #: includes/mollie/wc/helper/settings.php:358
492
  msgid "German"
493
  msgstr ""
494
 
495
+ #: includes/mollie/wc/helper/settings.php:359
496
  msgid "Spanish"
497
  msgstr ""
498
 
499
+ #: includes/mollie/wc/helper/settings.php:360
500
  msgid "French"
501
  msgstr ""
502
 
503
+ #: includes/mollie/wc/helper/settings.php:361
504
  msgid "French (Belgium)"
505
  msgstr ""
506
 
507
+ #: includes/mollie/wc/helper/settings.php:367
 
 
 
 
 
 
 
 
 
 
 
508
  msgid "Debug Log"
509
  msgstr ""
510
 
511
+ #. translators: Placeholder 1: Plugin name, placeholder 2: required WooCommerce
512
+ #. version, placeholder 3: used WooCommerce version
513
  #: includes/mollie/wc/helper/status.php:53
 
514
  msgid ""
515
  "The %s plugin requires at least WooCommerce version %s, you are using "
516
  "version %s. Please update your WooCommerce plugin."
522
  "correctly."
523
  msgstr ""
524
 
525
+ #. translators: Placeholder 1: Required PHP version, placeholder 2: current PHP
526
+ #. version
527
  #: includes/mollie/wc/helper/status.php:82
 
528
  msgid "The client requires PHP version >= %s, you have %s."
529
  msgstr ""
530
 
540
  "enable the 'curl' extension in your PHP configuration."
541
  msgstr ""
542
 
543
+ #. translators: Placeholder 1: The required cURL function names
544
  #: includes/mollie/wc/helper/status.php:99
 
545
  msgid ""
546
  "The Mollie API client requires the following PHP cURL functions to be "
547
  "available: %s. Please make sure all of these functions are available."
548
  msgstr ""
549
 
550
+ #: includes/mollie/wc/plugin.php:288
 
 
 
 
 
551
  msgid "Logs"
552
  msgstr ""
553
 
554
  #: mollie-payments-for-woocommerce.php:49
 
555
  msgid "Could not activate plugin %s"
556
  msgstr ""
557
 
558
+ #: mollie-payments-for-woocommerce.php:93
 
559
  msgid "%s deactivated because it depends on WooCommerce."
560
  msgstr ""
561
+
562
+ #. Plugin Name of the plugin/theme
563
+ msgid "Mollie Payments for WooCommerce"
564
+ msgstr ""
565
+
566
+ #. Plugin URI of the plugin/theme
567
+ msgid "https://github.com/mollie/WooCommerce"
568
+ msgstr ""
569
+
570
+ #. Description of the plugin/theme
571
+ msgid "Accept payments in WooCommerce with the official Mollie plugin"
572
+ msgstr ""
573
+
574
+ #. Author of the plugin/theme
575
+ msgid "Mollie"
576
+ msgstr ""
577
+
578
+ #. Author URI of the plugin/theme
579
+ msgid "https://www.mollie.com"
580
+ msgstr ""
includes/mollie-api-php/{README.mdown → README.md} RENAMED
@@ -24,13 +24,13 @@ To use the Mollie API client, the following things are required:
24
 
25
  By far the easiest way to install the Mollie API client is to require it with [Composer](http://getcomposer.org/doc/00-intro.md).
26
 
27
- $ composer require mollie/mollie-api-php:1.9.*
28
 
29
- {
30
- "require": {
31
- "mollie/mollie-api-php": "1.9.*"
32
- }
33
- }
34
 
35
  You may also git checkout or [download all the files](https://github.com/mollie/mollie-api-php/archive/master.zip), and include the Mollie API client manually.
36
 
@@ -49,37 +49,38 @@ To successfully receive a payment, these steps should be implemented:
49
  Requiring the included autoloader. If you're using Composer, you can skip this step.
50
 
51
  ```php
52
- require "Mollie/API/Autoloader.php";
53
  ```
54
-
55
  Initializing the Mollie API client, and setting your API key.
56
 
57
  ```php
58
- $mollie = new Mollie_API_Client;
59
- $mollie->setApiKey("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM");
60
- ```
61
 
62
  Creating a new payment.
63
-
64
  ```php
65
- $payment = $mollie->payments->create(array(
66
- "amount" => 10.00,
67
- "description" => "My first API payment",
68
- "redirectUrl" => "https://webshop.example.org/order/12345/",
69
- ));
 
70
  ```
71
-
72
  _After creation, the payment id is available in the `$payment->id` property. You should store this id with your order._
73
-
74
  Retrieving a payment.
75
 
76
  ```php
77
- $payment = $mollie->payments->get($payment->id);
78
 
79
- if ($payment->isPaid())
80
- {
81
- echo "Payment received.";
82
- }
83
  ```
84
 
85
  ### Fully integrated iDEAL payments ###
@@ -91,7 +92,7 @@ the payment.
91
  Retrieve the list of issuers:
92
 
93
  ```php
94
- $issuers = $mollie->issuers->all();
95
  ```
96
 
97
  _`$issuers` will be a list of `Mollie_API_Object_Issuer` objects. Use the property `$id` of this object in the
@@ -100,13 +101,14 @@ _`$issuers` will be a list of `Mollie_API_Object_Issuer` objects. Use the proper
100
  Create a payment with the selected issuer:
101
 
102
  ```php
103
- $payment = $mollie->payments->create(array(
104
- "amount" => 10.00,
105
- "description" => "My first API payment",
106
- "redirectUrl" => "https://webshop.example.org/order/12345/",
107
- "method" => Mollie_API_Object_Method::IDEAL,
108
- "issuer" => $selected_issuer_id, // e.g. "ideal_INGBNL2A"
109
- ));
 
110
  ```
111
 
112
  _The `links` property of the `$payment` object will contain a string `paymentUrl`, which is a URL that points directly to the online banking environment of the selected issuer._
@@ -118,10 +120,10 @@ definitive. Refunds are only supported for iDEAL, credit card, Bancontact/Mister
118
  be refunded through our API at the moment.
119
 
120
  ```php
121
- $payment = $mollie->payments->get($payment->id);
122
 
123
- // Refund € 15 of this payment
124
- $refund = $mollie->payments->refund($payment, 15.00);
125
  ```
126
 
127
  ## How to use OAuth2 to connect Mollie accounts to your application? ##
@@ -136,8 +138,8 @@ If you wish to learn more about our API, please visit the [Mollie Developer Port
136
  Want to help us make our API client even better? We take [pull requests](https://github.com/mollie/mollie-api-php/pulls?utf8=%E2%9C%93&q=is%3Apr), sure. But how would you like to contribute to a [technology oriented organization](https://www.mollie.com/nl/blog/post/werken-bij-mollie-als-developer/)? Mollie is hiring developers and system engineers. [Check out our vacancies](https://www.mollie.com/nl/jobs) or [get in touch](mailto:personeel@mollie.com).
137
 
138
  ## License ##
139
- [BSD (Berkeley Software Distribution) License](http://www.opensource.org/licenses/bsd-license.php).
140
- Copyright (c) 2013-2016, Mollie B.V.
141
 
142
  ## Support ##
143
  Contact: [www.mollie.com](https://www.mollie.com) — info@mollie.com — +31 20 820 20 70
24
 
25
  By far the easiest way to install the Mollie API client is to require it with [Composer](http://getcomposer.org/doc/00-intro.md).
26
 
27
+ $ composer require mollie/mollie-api-php:1.9.*
28
 
29
+ {
30
+ "require": {
31
+ "mollie/mollie-api-php": "1.9.*"
32
+ }
33
+ }
34
 
35
  You may also git checkout or [download all the files](https://github.com/mollie/mollie-api-php/archive/master.zip), and include the Mollie API client manually.
36
 
49
  Requiring the included autoloader. If you're using Composer, you can skip this step.
50
 
51
  ```php
52
+ require "Mollie/API/Autoloader.php";
53
  ```
54
+
55
  Initializing the Mollie API client, and setting your API key.
56
 
57
  ```php
58
+ $mollie = new Mollie_API_Client;
59
+ $mollie->setApiKey("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM");
60
+ ```
61
 
62
  Creating a new payment.
63
+
64
  ```php
65
+ $payment = $mollie->payments->create(array(
66
+ "amount" => 10.00,
67
+ "description" => "My first API payment",
68
+ "redirectUrl" => "https://webshop.example.org/order/12345/",
69
+ "webhookUrl" => "https://webshop.example.org/mollie-webhook/",
70
+ ));
71
  ```
72
+
73
  _After creation, the payment id is available in the `$payment->id` property. You should store this id with your order._
74
+
75
  Retrieving a payment.
76
 
77
  ```php
78
+ $payment = $mollie->payments->get($payment->id);
79
 
80
+ if ($payment->isPaid())
81
+ {
82
+ echo "Payment received.";
83
+ }
84
  ```
85
 
86
  ### Fully integrated iDEAL payments ###
92
  Retrieve the list of issuers:
93
 
94
  ```php
95
+ $issuers = $mollie->issuers->all();
96
  ```
97
 
98
  _`$issuers` will be a list of `Mollie_API_Object_Issuer` objects. Use the property `$id` of this object in the
101
  Create a payment with the selected issuer:
102
 
103
  ```php
104
+ $payment = $mollie->payments->create(array(
105
+ "amount" => 10.00,
106
+ "description" => "My first API payment",
107
+ "redirectUrl" => "https://webshop.example.org/order/12345/",
108
+ "webhookUrl" => "https://webshop.example.org/mollie-webhook/",
109
+ "method" => Mollie_API_Object_Method::IDEAL,
110
+ "issuer" => $selected_issuer_id, // e.g. "ideal_INGBNL2A"
111
+ ));
112
  ```
113
 
114
  _The `links` property of the `$payment` object will contain a string `paymentUrl`, which is a URL that points directly to the online banking environment of the selected issuer._
120
  be refunded through our API at the moment.
121
 
122
  ```php
123
+ $payment = $mollie->payments->get($payment->id);
124
 
125
+ // Refund € 15 of this payment
126
+ $refund = $mollie->payments->refund($payment, 15.00);
127
  ```
128
 
129
  ## How to use OAuth2 to connect Mollie accounts to your application? ##
138
  Want to help us make our API client even better? We take [pull requests](https://github.com/mollie/mollie-api-php/pulls?utf8=%E2%9C%93&q=is%3Apr), sure. But how would you like to contribute to a [technology oriented organization](https://www.mollie.com/nl/blog/post/werken-bij-mollie-als-developer/)? Mollie is hiring developers and system engineers. [Check out our vacancies](https://www.mollie.com/nl/jobs) or [get in touch](mailto:personeel@mollie.com).
139
 
140
  ## License ##
141
+ [BSD (Berkeley Software Distribution) License](https://opensource.org/licenses/bsd-license.php).
142
+ Copyright (c) 2013-2017, Mollie B.V.
143
 
144
  ## Support ##
145
  Contact: [www.mollie.com](https://www.mollie.com) — info@mollie.com — +31 20 820 20 70
includes/mollie-api-php/build/.gitignore ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ clover/
2
+ coverage/
3
+ logs/
includes/mollie-api-php/examples/02-webhook-verification.php CHANGED
@@ -12,14 +12,6 @@ try
12
  */
13
  include "initialize.php";
14
 
15
- /*
16
- * Check if this is a test request by Mollie
17
- */
18
- if (!empty($_GET['testByMollie']))
19
- {
20
- die('OK');
21
- }
22
-
23
  /*
24
  * Retrieve the payment's current state.
25
  */
12
  */
13
  include "initialize.php";
14
 
 
 
 
 
 
 
 
 
15
  /*
16
  * Retrieve the payment's current state.
17
  */
includes/mollie-api-php/examples/04-ideal-payment.php CHANGED
@@ -53,6 +53,7 @@ try
53
  * method Payment method "ideal".
54
  * description Description of the payment.
55
  * redirectUrl Redirect location. The customer will be redirected there after the payment.
 
56
  * metadata Custom metadata that is stored with the payment.
57
  * issuer The customer's bank. If empty the customer can select it later.
58
  */
@@ -61,6 +62,7 @@ try
61
  "method" => Mollie_API_Object_Method::IDEAL,
62
  "description" => "My first iDEAL payment",
63
  "redirectUrl" => "{$protocol}://{$hostname}{$path}/03-return-page.php?order_id={$order_id}",
 
64
  "metadata" => array(
65
  "order_id" => $order_id,
66
  ),
53
  * method Payment method "ideal".
54
  * description Description of the payment.
55
  * redirectUrl Redirect location. The customer will be redirected there after the payment.
56
+ * webhookUrl Webhook location, used to report when the payment changes state.
57
  * metadata Custom metadata that is stored with the payment.
58
  * issuer The customer's bank. If empty the customer can select it later.
59
  */
62
  "method" => Mollie_API_Object_Method::IDEAL,
63
  "description" => "My first iDEAL payment",
64
  "redirectUrl" => "{$protocol}://{$hostname}{$path}/03-return-page.php?order_id={$order_id}",
65
+ "webhookUrl" => "{$protocol}://{$hostname}{$path}/02-webhook-verification.php",
66
  "metadata" => array(
67
  "order_id" => $order_id,
68
  ),
includes/mollie-api-php/examples/22-create-mandate-subscription.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ try
3
+ {
4
+ /*
5
+ * Initialize the Mollie API library with your API key or OAuth access token.
6
+ */
7
+ include "initialize.php";
8
+ /*
9
+ * Customer creation parameters.
10
+ *
11
+ * See: https://www.mollie.com/en/docs/reference/customers/create
12
+ */
13
+ $membership_id = 1;
14
+
15
+ $customer = $mollie->customers->create(array(
16
+ "name" => 'Example name',
17
+ "email" => 'info@example.com',
18
+ ));
19
+ echo "<p>Customer created with id ". $customer->id."</p>";
20
+
21
+ // create mandate
22
+ $mandate = $mollie->customers_mandates->withParentId($customer->id)->create([
23
+ "method" => 'directdebit',
24
+ "consumerAccount" => 'NL12ABNA654065985',
25
+ "consumerName" => 'B. A. Example',
26
+ ]);
27
+ echo "<p>Mandate created with id ". $mandate->id."</p>";
28
+
29
+ // set recurring
30
+ $subscription = $mollie->customers_subscriptions->withParentId($customer->id)->create([
31
+ "amount" => 10.00,
32
+ "times" => 12, // recurring membership for 1 year
33
+ "interval" => "1 months", // every month
34
+ "description" => "Subscription ".$membership_id,
35
+ "webhookUrl" => "https://example.com/webhook.php",
36
+ "metadata" => [
37
+ "order_id" => $membership_id,
38
+ ],
39
+ ]);
40
+
41
+ echo "<p>Subscription created with id ". $subscription->id."</p>";
42
+ }
43
+ catch (Mollie_API_Exception $e)
44
+ {
45
+ error_log( "API call failed: " . htmlspecialchars($e->getMessage()));
46
+ }
47
+ ?>
includes/mollie-api-php/src/Mollie/API/Client.php CHANGED
@@ -7,10 +7,10 @@
7
  * modification, are permitted provided that the following conditions are met:
8
  *
9
  * - Redistributions of source code must retain the above copyright notice,
10
- * this list of conditions and the following disclaimer.
11
  * - Redistributions in binary form must reproduce the above copyright
12
- * notice, this list of conditions and the following disclaimer in the
13
- * documentation and/or other materials provided with the distribution.
14
  *
15
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
16
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -24,10 +24,10 @@
24
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
25
  * DAMAGE.
26
  *
27
- * @license Berkeley Software Distribution License (BSD-License 2) http://www.opensource.org/licenses/bsd-license.php
28
- * @author Mollie B.V. <info@mollie.com>
29
  * @copyright Mollie B.V.
30
- * @link https://www.mollie.com
31
  */
32
  class Mollie_API_Client
33
  {
@@ -46,7 +46,7 @@ class Mollie_API_Client
46
  */
47
  const API_VERSION = "v1";
48
 
49
- const HTTP_GET = "GET";
50
  const HTTP_POST = "POST";
51
  const HTTP_DELETE = "DELETE";
52
 
@@ -191,22 +191,22 @@ class Mollie_API_Client
191
  $this->getCompatibilityChecker()
192
  ->checkCompatibility();
193
 
194
- $this->payments = new Mollie_API_Resource_Payments($this);
195
- $this->payments_refunds = new Mollie_API_Resource_Payments_Refunds($this);
196
- $this->issuers = new Mollie_API_Resource_Issuers($this);
197
- $this->methods = new Mollie_API_Resource_Methods($this);
198
- $this->customers = new Mollie_API_Resource_Customers($this);
199
- $this->customers_payments = new Mollie_API_Resource_Customers_Payments($this);
200
- $this->customers_mandates = new Mollie_API_Resource_Customers_Mandates($this);
201
  $this->customers_subscriptions = new Mollie_API_Resource_Customers_Subscriptions($this);
202
 
203
  // OAuth2 endpoints
204
- $this->permissions = new Mollie_API_Resource_Permissions($this);
205
- $this->organizations = new Mollie_API_Resource_Organizations($this);
206
- $this->refunds = new Mollie_API_Resource_Refunds($this);
207
- $this->profiles = new Mollie_API_Resource_Profiles($this);
208
  $this->profiles_apikeys = new Mollie_API_Resource_Profiles_APIKeys($this);
209
- $this->settlements = new Mollie_API_Resource_Settlements($this);
210
 
211
  $curl_version = curl_version();
212
 
@@ -260,7 +260,7 @@ class Mollie_API_Client
260
  throw new Mollie_API_Exception("Invalid API key: '{$api_key}'. An API key must start with 'test_' or 'live_'.");
261
  }
262
 
263
- $this->api_key = $api_key;
264
  $this->oauth_access = FALSE;
265
  }
266
 
@@ -277,7 +277,7 @@ class Mollie_API_Client
277
  throw new Mollie_API_Exception("Invalid OAuth access token: '{$access_token}'. An access token must start with 'access_'.");
278
  }
279
 
280
- $this->api_key = $access_token;
281
  $this->oauth_access = TRUE;
282
  }
283
 
@@ -378,7 +378,7 @@ class Mollie_API_Client
378
 
379
  curl_setopt($this->ch, CURLOPT_HTTPHEADER, $request_headers);
380
  curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 2);
381
- curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, TRUE);
382
 
383
  /*
384
  * On some servers, the list of installed certificates is outdated or not present at all (the ca-bundle.crt
@@ -388,27 +388,13 @@ class Mollie_API_Client
388
 
389
  $body = curl_exec($this->ch);
390
 
391
- if (strpos(curl_error($this->ch), "certificate subject name 'mollie.nl' does not match target host") !== FALSE)
392
- {
393
- /*
394
- * On some servers, the wildcard SSL certificate is not processed correctly. This happens with OpenSSL 0.9.7
395
- * from 2003.
396
- */
397
- $request_headers[] = "X-Mollie-Debug: old OpenSSL found";
398
- curl_setopt($this->ch, CURLOPT_HTTPHEADER, $request_headers);
399
- curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 0);
400
- $body = curl_exec($this->ch);
401
- }
402
-
403
  $this->last_http_response_status_code = (int) curl_getinfo($this->ch, CURLINFO_HTTP_CODE);
404
 
405
  if (curl_errno($this->ch))
406
  {
407
  $message = "Unable to communicate with Mollie (".curl_errno($this->ch)."): " . curl_error($this->ch) . ".";
408
 
409
- curl_close($this->ch);
410
- $this->ch = NULL;
411
-
412
  throw new Mollie_API_Exception($message);
413
  }
414
 
@@ -417,24 +403,32 @@ class Mollie_API_Client
417
  /*
418
  * Keep it open if supported by PHP, else close the handle.
419
  */
420
- curl_close($this->ch);
421
- $this->ch = NULL;
422
  }
423
 
424
  return $body;
425
  }
426
 
427
  /**
428
- * Close any cURL handles, if we have them.
429
  */
430
- public function __destruct ()
431
  {
432
  if (is_resource($this->ch))
433
  {
434
  curl_close($this->ch);
 
435
  }
436
  }
437
 
 
 
 
 
 
 
 
 
438
  /**
439
  * @return Mollie_API_CompatibilityChecker
440
  * @codeCoverageIgnore
7
  * modification, are permitted provided that the following conditions are met:
8
  *
9
  * - Redistributions of source code must retain the above copyright notice,
10
+ * this list of conditions and the following disclaimer.
11
  * - Redistributions in binary form must reproduce the above copyright
12
+ * notice, this list of conditions and the following disclaimer in the
13
+ * documentation and/or other materials provided with the distribution.
14
  *
15
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
16
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
25
  * DAMAGE.
26
  *
27
+ * @license Berkeley Software Distribution License (BSD-License 2) http://www.opensource.org/licenses/bsd-license.php
28
+ * @author Mollie B.V. <info@mollie.com>
29
  * @copyright Mollie B.V.
30
+ * @link https://www.mollie.com
31
  */
32
  class Mollie_API_Client
33
  {
46
  */
47
  const API_VERSION = "v1";
48
 
49
+ const HTTP_GET = "GET";
50
  const HTTP_POST = "POST";
51
  const HTTP_DELETE = "DELETE";
52
 
191
  $this->getCompatibilityChecker()
192
  ->checkCompatibility();
193
 
194
+ $this->payments = new Mollie_API_Resource_Payments($this);
195
+ $this->payments_refunds = new Mollie_API_Resource_Payments_Refunds($this);
196
+ $this->issuers = new Mollie_API_Resource_Issuers($this);
197
+ $this->methods = new Mollie_API_Resource_Methods($this);
198
+ $this->customers = new Mollie_API_Resource_Customers($this);
199
+ $this->customers_payments = new Mollie_API_Resource_Customers_Payments($this);
200
+ $this->customers_mandates = new Mollie_API_Resource_Customers_Mandates($this);
201
  $this->customers_subscriptions = new Mollie_API_Resource_Customers_Subscriptions($this);
202
 
203
  // OAuth2 endpoints
204
+ $this->permissions = new Mollie_API_Resource_Permissions($this);
205
+ $this->organizations = new Mollie_API_Resource_Organizations($this);
206
+ $this->refunds = new Mollie_API_Resource_Refunds($this);
207
+ $this->profiles = new Mollie_API_Resource_Profiles($this);
208
  $this->profiles_apikeys = new Mollie_API_Resource_Profiles_APIKeys($this);
209
+ $this->settlements = new Mollie_API_Resource_Settlements($this);
210
 
211
  $curl_version = curl_version();
212
 
260
  throw new Mollie_API_Exception("Invalid API key: '{$api_key}'. An API key must start with 'test_' or 'live_'.");
261
  }
262
 
263
+ $this->api_key = $api_key;
264
  $this->oauth_access = FALSE;
265
  }
266
 
277
  throw new Mollie_API_Exception("Invalid OAuth access token: '{$access_token}'. An access token must start with 'access_'.");
278
  }
279
 
280
+ $this->api_key = $access_token;
281
  $this->oauth_access = TRUE;
282
  }
283
 
378
 
379
  curl_setopt($this->ch, CURLOPT_HTTPHEADER, $request_headers);
380
  curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 2);
381
+ curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, true);
382
 
383
  /*
384
  * On some servers, the list of installed certificates is outdated or not present at all (the ca-bundle.crt
388
 
389
  $body = curl_exec($this->ch);
390
 
 
 
 
 
 
 
 
 
 
 
 
 
391
  $this->last_http_response_status_code = (int) curl_getinfo($this->ch, CURLINFO_HTTP_CODE);
392
 
393
  if (curl_errno($this->ch))
394
  {
395
  $message = "Unable to communicate with Mollie (".curl_errno($this->ch)."): " . curl_error($this->ch) . ".";
396
 
397
+ $this->closeTcpConnection();
 
 
398
  throw new Mollie_API_Exception($message);
399
  }
400
 
403
  /*
404
  * Keep it open if supported by PHP, else close the handle.
405
  */
406
+ $this->closeTcpConnection();
 
407
  }
408
 
409
  return $body;
410
  }
411
 
412
  /**
413
+ * Close the TCP connection to the Mollie API.
414
  */
415
+ private function closeTcpConnection ()
416
  {
417
  if (is_resource($this->ch))
418
  {
419
  curl_close($this->ch);
420
+ $this->ch = null;
421
  }
422
  }
423
 
424
+ /**
425
+ * Close any cURL handles, if we have them.
426
+ */
427
+ public function __destruct ()
428
+ {
429
+ $this->closeTcpConnection();
430
+ }
431
+
432
  /**
433
  * @return Mollie_API_CompatibilityChecker
434
  * @codeCoverageIgnore
includes/mollie-api-php/tests/Mollie/API/Object/PaymentTest.php ADDED
@@ -0,0 +1,254 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Mollie_API_Object_PaymentTest extends PHPUnit_Framework_TestCase
4
+ {
5
+ public function testIsCancelledReturnsTrueWhenStatusIsCancelled ()
6
+ {
7
+ $payment = new Mollie_API_Object_Payment();
8
+
9
+ $payment->status = Mollie_API_Object_Payment::STATUS_CANCELLED;
10
+ $this->assertTrue($payment->isCancelled());
11
+ }
12
+
13
+ public function testIsCancelledReturnsFalseWhenStatusIsNotCancelled ()
14
+ {
15
+ $payment = new Mollie_API_Object_Payment();
16
+
17
+ $payment->status = NULL;
18
+ $this->assertFalse($payment->isCancelled());
19
+
20
+ $payment->status = Mollie_API_Object_Payment::STATUS_FAILED;
21
+ $this->assertFalse($payment->isCancelled());
22
+ }
23
+
24
+ public function testIsExpiredReturnsTrueWhenStatusIsExpired ()
25
+ {
26
+ $payment = new Mollie_API_Object_Payment();
27
+
28
+ $payment->status = Mollie_API_Object_Payment::STATUS_EXPIRED;
29
+ $this->assertTrue($payment->isExpired());
30
+ }
31
+
32
+ public function testIsExpiredReturnsFalseWhenStatusIsNotExpired ()
33
+ {
34
+ $payment = new Mollie_API_Object_Payment();
35
+
36
+ $payment->status = NULL;
37
+ $this->assertFalse($payment->isExpired());
38
+
39
+ $payment->status = Mollie_API_Object_Payment::STATUS_FAILED;
40
+ $this->assertFalse($payment->isExpired());
41
+ }
42
+
43
+ public function testIsOpenReturnsTrueWhenStatusIsOpen ()
44
+ {
45
+ $payment = new Mollie_API_Object_Payment();
46
+
47
+ $payment->status = Mollie_API_Object_Payment::STATUS_OPEN;
48
+ $this->assertTrue($payment->isOpen());
49
+ }
50
+
51
+ public function testIsOpenReturnsFalseWhenStatusIsNotOpen ()
52
+ {
53
+ $payment = new Mollie_API_Object_Payment();
54
+
55
+ $payment->status = NULL;
56
+ $this->assertFalse($payment->isOpen());
57
+
58
+ $payment->status = Mollie_API_Object_Payment::STATUS_FAILED;
59
+ $this->assertFalse($payment->isOpen());
60
+ }
61
+
62
+ public function testIsPendingReturnsTrueWhenStatusIsPending ()
63
+ {
64
+ $payment = new Mollie_API_Object_Payment();
65
+
66
+ $payment->status = Mollie_API_Object_Payment::STATUS_PENDING;
67
+ $this->assertTrue($payment->isPending());
68
+ }
69
+
70
+ public function testIsPendingReturnsFalseWhenStatusIsNotPending ()
71
+ {
72
+ $payment = new Mollie_API_Object_Payment();
73
+
74
+ $payment->status = NULL;
75
+ $this->assertFalse($payment->isPending());
76
+
77
+ $payment->status = Mollie_API_Object_Payment::STATUS_FAILED;
78
+ $this->assertFalse($payment->isPending());
79
+ }
80
+
81
+ public function testIsPaidReturnsTrueWhenPaidDatetimeIsSet ()
82
+ {
83
+ $payment = new Mollie_API_Object_Payment();
84
+
85
+ $payment->paidDatetime = "2016-10-24";
86
+ $this->assertTrue($payment->isPaid());
87
+ }
88
+
89
+ public function testIsPaidReturnsFalseWhenStatusIsPaid ()
90
+ {
91
+ $payment = new Mollie_API_Object_Payment();
92
+
93
+ $payment->status = Mollie_API_Object_Payment::STATUS_PAID;
94
+ $this->assertFalse($payment->isPaid());
95
+ }
96
+
97
+ public function testIsPaidReturnsFalseWhenStatusIsNotPaid ()
98
+ {
99
+ $payment = new Mollie_API_Object_Payment();
100
+
101
+ $payment->status = NULL;
102
+ $this->assertFalse($payment->isPaid());
103
+
104
+ $payment->status = Mollie_API_Object_Payment::STATUS_FAILED;
105
+ $this->assertFalse($payment->isPaid());
106
+ }
107
+
108
+ public function testIsPaidOutReturnsTrueWhenStatusIsPaidOut ()
109
+ {
110
+ $payment = new Mollie_API_Object_Payment();
111
+
112
+ $payment->status = Mollie_API_Object_Payment::STATUS_PAIDOUT;
113
+ $this->assertTrue($payment->isPaidOut());
114
+ }
115
+
116
+ public function testIsPaidOutReturnsFalseWhenStatusIsNotPaidOut ()
117
+ {
118
+ $payment = new Mollie_API_Object_Payment();
119
+
120
+ $payment->status = NULL;
121
+ $this->assertFalse($payment->isPaidOut());
122
+
123
+ $payment->status = Mollie_API_Object_Payment::STATUS_REFUNDED;
124
+ $this->assertFalse($payment->isPaidOut());
125
+ }
126
+
127
+ public function testIsRefundedReturnsTrueWhenStatusIsRefunded ()
128
+ {
129
+ $payment = new Mollie_API_Object_Payment();
130
+
131
+ $payment->status = Mollie_API_Object_Payment::STATUS_REFUNDED;
132
+ $this->assertTrue($payment->isRefunded());
133
+ }
134
+
135
+ public function testIsRefundedReturnsFalseWhenStatusIsNotRefunded ()
136
+ {
137
+ $payment = new Mollie_API_Object_Payment();
138
+
139
+ $payment->status = NULL;
140
+ $this->assertFalse($payment->isRefunded());
141
+
142
+ $payment->status = Mollie_API_Object_Payment::STATUS_CANCELLED;
143
+ $this->assertFalse($payment->isRefunded());
144
+ }
145
+
146
+ public function testIsChargedBackReturnsTrueWhenStatusIsChargedBack ()
147
+ {
148
+ $payment = new Mollie_API_Object_Payment();
149
+
150
+ $payment->status = Mollie_API_Object_Payment::STATUS_CHARGED_BACK;
151
+ $this->assertTrue($payment->isChargedBack());
152
+ }
153
+
154
+ public function testIsChargedBackReturnsFalseWhenStatusIsNotChargedBack ()
155
+ {
156
+ $payment = new Mollie_API_Object_Payment();
157
+
158
+ $payment->status = NULL;
159
+ $this->assertFalse($payment->isChargedBack());
160
+
161
+ $payment->status = Mollie_API_Object_Payment::STATUS_CANCELLED;
162
+ $this->assertFalse($payment->isChargedBack());
163
+ }
164
+
165
+ public function testHasRecurringTypeReturnsTrueWhenRecurringTypeIsFirst ()
166
+ {
167
+ $payment = new Mollie_API_Object_Payment();
168
+
169
+ $payment->recurringType = Mollie_API_Object_Payment::RECURRINGTYPE_FIRST;
170
+ $this->assertTrue($payment->hasRecurringType());
171
+ $this->assertFalse($payment->hasRecurringTypeRecurring());
172
+ $this->assertTrue($payment->hasRecurringTypeFirst());
173
+ }
174
+
175
+ public function testHasRecurringTypeReturnsTrueWhenRecurringTypeIsRecurring ()
176
+ {
177
+ $payment = new Mollie_API_Object_Payment();
178
+
179
+ $payment->recurringType = Mollie_API_Object_Payment::RECURRINGTYPE_RECURRING;
180
+ $this->assertTrue($payment->hasRecurringType());
181
+ $this->assertTrue($payment->hasRecurringTypeRecurring());
182
+ $this->assertFalse($payment->hasRecurringTypeFirst());
183
+ }
184
+
185
+ public function testHasRecurringTypeReturnsFalseWhenRecurringTypeIsNone ()
186
+ {
187
+ $payment = new Mollie_API_Object_Payment();
188
+
189
+ $payment->recurringType = Mollie_API_Object_Payment::RECURRINGTYPE_NONE;
190
+ $this->assertFalse($payment->hasRecurringType());
191
+ $this->assertFalse($payment->hasRecurringTypeFirst());
192
+ $this->assertFalse($payment->hasRecurringTypeRecurring());
193
+ }
194
+
195
+ public function testGetPaymentUrlReturnsPaymentUrlFromLinksObject ()
196
+ {
197
+ $payment = new Mollie_API_Object_Payment();
198
+
199
+ $payment->links = new stdClass();
200
+ $payment->links->paymentUrl = "https://example.com";
201
+
202
+ $this->assertSame($payment->getPaymentUrl(), "https://example.com");
203
+ }
204
+
205
+ public function testCanBeRefundedReturnsTrueWhenAmountRemainingIsSet ()
206
+ {
207
+ $payment = new Mollie_API_Object_Payment();
208
+
209
+ $payment->amountRemaining = 15;
210
+ $this->assertTrue($payment->canBeRefunded());
211
+ $this->assertTrue($payment->canBePartiallyRefunded());
212
+ }
213
+
214
+ public function testCanBeRefundedReturnsFalseWhenAmountRemainingIsNull ()
215
+ {
216
+ $payment = new Mollie_API_Object_Payment();
217
+
218
+ $payment->amountRemaining = NULL;
219
+ $this->assertFalse($payment->canBeRefunded());
220
+ $this->assertFalse($payment->canBePartiallyRefunded());
221
+ }
222
+
223
+ public function testGetAmountRefundedReturnsAmountRefundedAsFloat ()
224
+ {
225
+ $payment = new Mollie_API_Object_Payment();
226
+
227
+ $payment->amountRefunded = 22;
228
+ self::assertSame(22.0, $payment->getAmountRefunded());
229
+ }
230
+
231
+ public function testGetAmountRefundedReturns0WhenAmountRefundedIsSetToNull ()
232
+ {
233
+ $payment = new Mollie_API_Object_Payment();
234
+
235
+ $payment->amountRefunded = NULL;
236
+ self::assertSame(0.0, $payment->getAmountRefunded());
237
+ }
238
+
239
+ public function testGetAmountRemainingReturnsAmountRemainingAsFloat ()
240
+ {
241
+ $payment = new Mollie_API_Object_Payment();
242
+
243
+ $payment->amountRemaining = 22;
244
+ self::assertSame(22.0, $payment->getAmountRemaining());
245
+ }
246
+
247
+ public function testGetAmountRemainingReturns0WhenAmountRemainingIsSetToNull ()
248
+ {
249
+ $payment = new Mollie_API_Object_Payment();
250
+
251
+ $payment->amountRefunded = NULL;
252
+ self::assertSame(0.0, $payment->getAmountRemaining());
253
+ }
254
+ }
includes/mollie-api-php/tests/Mollie/API/Object/Profile/APIKeyUnitTest.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Mollie_API_Object_Profiles_APIKeyUnitTest extends PHPUnit_Framework_TestCase
4
+ {
5
+ public function testLiveApiKey ()
6
+ {
7
+ $api_key = new Mollie_API_Object_Profile_APIKey();
8
+ $api_key->id = "live";
9
+
10
+ self::assertTrue($api_key->isLiveKey());
11
+ self::assertFalse($api_key->isTestKey());
12
+ }
13
+
14
+ public function testTestApiKey ()
15
+ {
16
+ $api_key = new Mollie_API_Object_Profile_APIKey();
17
+ $api_key->id = "test";
18
+
19
+ self::assertTrue($api_key->isTestKey());
20
+ self::assertFalse($api_key->isLiveKey());
21
+ }
22
+ }
includes/mollie-api-php/tests/apiUnitTest.php CHANGED
@@ -23,7 +23,7 @@ class Mollie_ApiUnitTest extends PHPUnit_Framework_TestCase
23
  ->getMock();
24
 
25
  $this->api = $this->getMockBuilder("Mollie_API_Client")
26
- ->setMethods(array("performHttpCall", "getCompatibilityChecker"))
27
  ->disableOriginalConstructor()
28
  ->getMock();
29
 
@@ -368,6 +368,20 @@ class Mollie_ApiUnitTest extends PHPUnit_Framework_TestCase
368
  $this->assertTrue($deleted_subscription->isCancelled());
369
  }
370
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
371
  public function testUndefinedResourceCallsResourceEndpoint ()
372
  {
373
  $this->api->expects($this->once())
@@ -431,7 +445,6 @@ class Mollie_ApiUnitTest extends PHPUnit_Framework_TestCase
431
  ));
432
 
433
  $customer = new Mollie_API_Object_Customer();
434
- $customer->resource = 'customers';
435
  $customer->id = $customer_id;
436
  $customer->name = $expected_customer_api_call_data['name'];
437
  $customer->email = $expected_customer_api_call_data['email'];
@@ -452,4 +465,100 @@ class Mollie_ApiUnitTest extends PHPUnit_Framework_TestCase
452
  self::assertEquals($updated_customer->locale, $expected_customer_api_call_data['locale']);
453
  self::assertEquals($updated_customer->metadata->my_id, $expected_customer_api_call_data['metadata']['my_id']);
454
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
455
  }
23
  ->getMock();
24
 
25
  $this->api = $this->getMockBuilder("Mollie_API_Client")
26
+ ->setMethods(array("performHttpCall", "getCompatibilityChecker", "getLastHttpResponseStatusCode"))
27
  ->disableOriginalConstructor()
28
  ->getMock();
29
 
368
  $this->assertTrue($deleted_subscription->isCancelled());
369
  }
370
 
371
+ public function testDeleteCustomerWorksCorrectly ()
372
+ {
373
+ $this->api->expects($this->once())
374
+ ->method('getLastHttpResponseStatusCode')
375
+ ->willReturn(Mollie_API_Client::HTTP_STATUS_NO_CONTENT);
376
+
377
+ $this->api->expects($this->once())
378
+ ->method("performHttpCall")
379
+ ->with(Mollie_API_Client::HTTP_DELETE, "customers/cst_3EA3vd0b0E")
380
+ ->willReturn(NULL);
381
+
382
+ $this->api->customers->delete("cst_3EA3vd0b0E");
383
+ }
384
+
385
  public function testUndefinedResourceCallsResourceEndpoint ()
386
  {
387
  $this->api->expects($this->once())
445
  ));
446
 
447
  $customer = new Mollie_API_Object_Customer();
 
448
  $customer->id = $customer_id;
449
  $customer->name = $expected_customer_api_call_data['name'];
450
  $customer->email = $expected_customer_api_call_data['email'];
465
  self::assertEquals($updated_customer->locale, $expected_customer_api_call_data['locale']);
466
  self::assertEquals($updated_customer->metadata->my_id, $expected_customer_api_call_data['metadata']['my_id']);
467
  }
468
+
469
+ public function testProfileApiKeyGetWorksCorrectly ()
470
+ {
471
+ $profile_id = "pfl_v9hTwCvYqw";
472
+ $api_key_mode = "live";
473
+
474
+ $return_value = array(
475
+ "id" => $api_key_mode,
476
+ "key" => "live_eSf9fQRwpsdfPY8y3tUFFmqjADRKyA",
477
+ "createdDatetime" => "2016-09-19T12:31:09.0Z"
478
+ );
479
+
480
+ $this->api->expects($this->once())
481
+ ->method("performHttpCall")
482
+ ->with(Mollie_API_Client::HTTP_GET, "profiles/$profile_id/apikeys/$api_key_mode")
483
+ ->willReturn(json_encode($return_value));
484
+
485
+ $api_key = $this->api->profiles_apikeys->withParentId($profile_id)->get($api_key_mode);
486
+
487
+ self::assertEquals($api_key_mode, $api_key->id);
488
+ self::assertEquals($return_value['key'], $api_key->key);
489
+ self::assertEquals($return_value['createdDatetime'], $api_key->createdDatetime);
490
+
491
+ self::assertTrue($api_key->isLiveKey());
492
+ self::assertFalse($api_key->isTestKey());
493
+ }
494
+
495
+ public function testProfileUpdateWorksCorrectly ()
496
+ {
497
+ $profile_id = "pfl_v9hTwCvYqw";
498
+
499
+ $expected_profile_api_call_data = array(
500
+ "name" => "Mollie",
501
+ "website" => "www.mollie.com",
502
+ "email" => "info@mollie.com",
503
+ "phone" => "06123827111",
504
+ "categoryCode" => 5399,
505
+ "mode" => "live"
506
+ );
507
+
508
+ $return_value = array_merge($expected_profile_api_call_data, array(
509
+ "id" => $profile_id,
510
+ ));
511
+
512
+ $profile = new Mollie_API_Object_Profile();
513
+ $profile->id = $profile_id;
514
+ $profile->name = $expected_profile_api_call_data['name'];
515
+ $profile->website = $expected_profile_api_call_data['website'];
516
+ $profile->email = $expected_profile_api_call_data['email'];
517
+ $profile->phone = $expected_profile_api_call_data['phone'];
518
+ $profile->categoryCode = $expected_profile_api_call_data['categoryCode'];
519
+ $profile->mode = $expected_profile_api_call_data['mode'];
520
+
521
+ $this->api->expects($this->once())
522
+ ->method("performHttpCall")
523
+ ->with(Mollie_API_Client::HTTP_POST, "profiles/pfl_v9hTwCvYqw", json_encode($expected_profile_api_call_data))
524
+ ->will($this->returnValue(json_encode($return_value)));
525
+
526
+ /** @var Mollie_API_Object_Profile $updated_profile */
527
+ $updated_profile = $this->api->profiles->update($profile);
528
+
529
+ self::assertEquals($updated_profile->id, $profile_id);
530
+ self::assertEquals($updated_profile->name, $expected_profile_api_call_data['name']);
531
+ self::assertEquals($updated_profile->website, $expected_profile_api_call_data['website']);
532
+ self::assertEquals($updated_profile->email, $expected_profile_api_call_data['email']);
533
+ self::assertEquals($updated_profile->phone, $expected_profile_api_call_data['phone']);
534
+ self::assertEquals($updated_profile->categoryCode, $expected_profile_api_call_data['categoryCode']);
535
+ self::assertEquals($updated_profile->mode, $expected_profile_api_call_data['mode']);
536
+ }
537
+
538
+ public function testProfileApiKeyResetWorks ()
539
+ {
540
+ $profile_id = "pfl_v9hTwCvYqw";
541
+ $api_key_mode = "live";
542
+
543
+ $return_value = array(
544
+ "id" => $api_key_mode,
545
+ "key" => "live_eSf9fQRwpsdfPY8y3tUFFmqjADRKyA",
546
+ "createdDatetime" => "2016-09-19T12:31:09.0Z"
547
+ );
548
+
549
+ $this->api->expects($this->once())
550
+ ->method("performHttpCall")
551
+ ->with(Mollie_API_Client::HTTP_POST, "profiles/$profile_id/apikeys/$api_key_mode")
552
+ ->willReturn(json_encode($return_value));
553
+
554
+ /** @var Mollie_API_Object_Profile_APIKey $updated_api_key */
555
+ $updated_api_key = $this->api->profiles_apikeys->withParentId($profile_id)->reset($api_key_mode);
556
+
557
+ self::assertEquals($api_key_mode, $updated_api_key->id);
558
+ self::assertEquals($return_value['key'], $updated_api_key->key);
559
+ self::assertEquals($return_value['createdDatetime'], $updated_api_key->createdDatetime);
560
+
561
+ self::assertTrue($updated_api_key->isLiveKey());
562
+ self::assertFalse($updated_api_key->isTestKey());
563
+ }
564
  }
includes/mollie/wc/gateway/abstract.php CHANGED
@@ -310,7 +310,11 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
310
 
311
  try
312
  {
313
- Mollie_WC_Plugin::debug($this->id . ': Create payment for order ' . $order->id, true);
 
 
 
 
314
 
315
  do_action(Mollie_WC_Plugin::PLUGIN_ID . '_create_payment', $data, $order);
316
 
@@ -335,7 +339,11 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
335
 
336
  do_action(Mollie_WC_Plugin::PLUGIN_ID . '_payment_created', $payment, $order);
337
 
338
- Mollie_WC_Plugin::debug($this->id . ': Payment ' . $payment->id . ' (' . $payment->mode . ') created for order ' . $order->id);
 
 
 
 
339
 
340
  // Set initial status
341
  // Status is only updated if the new status is not the same as the default order status (pending)
@@ -361,7 +369,11 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
361
  }
362
  catch (Mollie_API_Exception $e)
363
  {
364
- Mollie_WC_Plugin::debug($this->id . ': Failed to create payment for order ' . $order->id . ': ' . $e->getMessage());
 
 
 
 
365
 
366
  /* translators: Placeholder 1: Payment method title */
367
  $message = sprintf(__('Could not create %s payment.', 'mollie-payments-for-woocommerce'), $this->title);
@@ -383,11 +395,19 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
383
  */
384
  protected function saveMollieInfo($order, $payment)
385
  {
386
- // Set active Mollie payment
387
- Mollie_WC_Plugin::getDataHelper()->setActiveMolliePayment($order->id, $payment);
388
-
389
- // Set Mollie customer
390
- Mollie_WC_Plugin::getDataHelper()->setUserMollieCustomerId($order->customer_user, $payment->customerId);
 
 
 
 
 
 
 
 
391
  }
392
 
393
  /**
@@ -406,34 +426,65 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
406
  $return_url = $this->getReturnUrl($order);
407
  $webhook_url = $this->getWebhookUrl($order);
408
 
409
-
410
- $payment_description = strtr($payment_description, array(
411
- '{order_number}' => $order->get_order_number(),
412
- '{order_date}' => date_i18n(wc_date_format(), strtotime($order->order_date)),
413
- ));
414
-
415
- $paymentRequestData = array(
416
- 'amount' => $order->get_total(),
417
- 'description' => $payment_description,
418
- 'redirectUrl' => $return_url,
419
- 'webhookUrl' => $webhook_url,
420
- 'method' => $mollie_method,
421
- 'issuer' => $selected_issuer,
422
- 'locale' => $payment_locale,
423
- 'billingAddress' => $order->billing_address_1,
424
- 'billingCity' => $order->billing_city,
425
- 'billingRegion' => $order->billing_state,
426
- 'billingPostal' => $order->billing_postcode,
427
- 'billingCountry' => $order->billing_country,
428
- 'shippingAddress' => $order->shipping_address_1,
429
- 'shippingCity' => $order->shipping_city,
430
- 'shippingRegion' => $order->shipping_state,
431
- 'shippingPostal' => $order->shipping_postcode,
432
- 'shippingCountry' => $order->shipping_country,
433
- 'metadata' => array(
434
- 'order_id' => $order->id,
435
- ),
436
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
437
 
438
  if ($store_customer)
439
  $paymentRequestData['customerId'] = $customer_id;
@@ -449,7 +500,9 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
449
  */
450
  protected function getUserMollieCustomerId($order, $test_mode)
451
  {
452
- return Mollie_WC_Plugin::getDataHelper()->getUserMollieCustomerId($order->customer_user, $test_mode);
 
 
453
  }
454
 
455
  /**
@@ -477,32 +530,65 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
477
  {
478
  $order->update_status($new_status, $note);
479
 
480
- switch ($new_status)
481
- {
482
- case self::STATUS_ON_HOLD:
483
- if (!get_post_meta($order->id, '_order_stock_reduced', $single = true))
484
- {
485
- // Reduce order stock
486
- $order->reduce_order_stock();
487
 
488
- Mollie_WC_Plugin::debug(__METHOD__ . ": Stock for order {$order->id} reduced.");
489
- }
 
 
 
 
 
490
 
491
- break;
 
492
 
493
- case self::STATUS_PENDING:
494
- case self::STATUS_FAILED:
495
- case self::STATUS_CANCELLED:
496
- if (get_post_meta($order->id, '_order_stock_reduced', $single = true))
497
- {
498
- // Restore order stock
499
- Mollie_WC_Plugin::getDataHelper()->restoreOrderStock($order);
500
 
501
- Mollie_WC_Plugin::debug(__METHOD__ . " Stock for order {$order->id} restored.");
502
- }
 
 
 
 
 
503
 
504
- break;
505
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
506
  }
507
 
508
 
@@ -587,7 +673,11 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
587
  return;
588
  }
589
 
590
- Mollie_WC_Plugin::debug($this->id . ": Mollie payment {$payment->id} (" . $payment->mode . ") webhook call for order {$order->id}.", true);
 
 
 
 
591
 
592
  $method_name = 'onWebhook' . ucfirst($payment->status);
593
 
@@ -613,13 +703,20 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
613
  * @param $order
614
  * @param $payment
615
  */
616
- protected function handlePayedOrderWebhook($order, $payment)
617
- {
618
- // Duplicate webhook call
619
- Mollie_WC_Plugin::setHttpResponseCode(204);
620
- Mollie_WC_Plugin::debug($this->id . ": Order $order->id does not need a payment (payment webhook {$payment->id}).", true);
621
 
622
- }
 
 
 
 
 
 
 
 
 
623
 
624
  /**
625
  * @param $payment
@@ -632,14 +729,14 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
632
  }
633
 
634
  /**
635
- * @param Wc_Order $order
636
  * @param Mollie_API_Object_Payment $payment
637
  */
638
- protected function onWebhookPaid(Wc_Order $order, Mollie_API_Object_Payment $payment)
639
  {
640
  Mollie_WC_Plugin::debug(__METHOD__ . ' called.');
641
 
642
- // Woocommerce 2.2.0 has the option to store the Payment transaction id.
643
  $woo_version = get_option('woocommerce_version', 'Unknown');
644
 
645
  if (version_compare($woo_version, '2.2.0', '>='))
@@ -675,17 +772,23 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
675
 
676
 
677
  /**
678
- * @param Wc_Order $order
679
  * @param Mollie_API_Object_Payment $payment
680
  */
681
- protected function onWebhookCancelled(Wc_Order $order, Mollie_API_Object_Payment $payment)
682
  {
683
  Mollie_WC_Plugin::debug(__METHOD__ . ' called.');
684
 
685
- // Unset active Mollie payment id
686
- Mollie_WC_Plugin::getDataHelper()
687
- ->unsetActiveMolliePayment($order->id)
688
- ->setCancelledMolliePaymentId($order->id, $payment->id);
 
 
 
 
 
 
689
 
690
  // New order status
691
  $new_order_status = self::STATUS_PENDING;
@@ -711,10 +814,10 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
711
  }
712
 
713
  /**
714
- * @param Wc_Order $order
715
  * @param Mollie_API_Object_Payment $payment
716
  */
717
- protected function onWebhookExpired(Wc_Order $order, Mollie_API_Object_Payment $payment)
718
  {
719
  Mollie_WC_Plugin::debug(__METHOD__ . ' called.');
720
 
@@ -748,7 +851,9 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
748
  {
749
  $data_helper = Mollie_WC_Plugin::getDataHelper();
750
 
751
- if ($data_helper->hasCancelledMolliePayment($order->id))
 
 
752
  {
753
  Mollie_WC_Plugin::addNotice(__('You have cancelled your payment. Please complete your order with a different payment method.', 'mollie-payments-for-woocommerce'));
754
 
@@ -875,13 +980,23 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
875
  */
876
  public function displayInstructions(WC_Order $order, $admin_instructions = false, $plain_text = false)
877
  {
 
 
 
 
 
 
878
  // Invalid gateway
879
- if ($this->id !== $order->payment_method)
880
  {
881
  return;
882
  }
883
 
884
- $payment = Mollie_WC_Plugin::getDataHelper()->getActiveMolliePayment($order->id);
 
 
 
 
885
 
886
  // Mollie payment not found or invalid gateway
887
  if (!$payment || $payment->method != $this->getMollieMethodId())
@@ -1005,10 +1120,18 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
1005
  $site_url = get_site_url();
1006
 
1007
  $return_url = WC()->api_request_url('mollie_return');
1008
- $return_url = add_query_arg(array(
1009
- 'order_id' => $order->id,
1010
- 'key' => $order->order_key,
1011
- ), $return_url);
 
 
 
 
 
 
 
 
1012
 
1013
  $lang_url = $this->getSiteUrlWithLanguage();
1014
  $return_url = str_replace($site_url, $lang_url, $return_url);
@@ -1025,10 +1148,18 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
1025
  $site_url = get_site_url();
1026
 
1027
  $webhook_url = WC()->api_request_url(strtolower(get_class($this)));
1028
- $webhook_url = add_query_arg(array(
1029
- 'order_id' => $order->id,
1030
- 'key' => $order->order_key,
1031
- ), $webhook_url);
 
 
 
 
 
 
 
 
1032
 
1033
  $lang_url = $this->getSiteUrlWithLanguage();
1034
  $webhook_url = str_replace($site_url, $lang_url, $webhook_url);
310
 
311
  try
312
  {
313
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
314
+ Mollie_WC_Plugin::debug( $this->id . ': Create payment for order ' . $order->id, true );
315
+ } else {
316
+ Mollie_WC_Plugin::debug( $this->id . ': Create payment for order ' . $order->get_id(), true );
317
+ }
318
 
319
  do_action(Mollie_WC_Plugin::PLUGIN_ID . '_create_payment', $data, $order);
320
 
339
 
340
  do_action(Mollie_WC_Plugin::PLUGIN_ID . '_payment_created', $payment, $order);
341
 
342
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
343
+ Mollie_WC_Plugin::debug( $this->id . ': Payment ' . $payment->id . ' (' . $payment->mode . ') created for order ' . $order->id );
344
+ } else {
345
+ Mollie_WC_Plugin::debug( $this->id . ': Payment ' . $payment->id . ' (' . $payment->mode . ') created for order ' . $order->get_id() );
346
+ }
347
 
348
  // Set initial status
349
  // Status is only updated if the new status is not the same as the default order status (pending)
369
  }
370
  catch (Mollie_API_Exception $e)
371
  {
372
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
373
+ Mollie_WC_Plugin::debug( $this->id . ': Failed to create payment for order ' . $order->id . ': ' . $e->getMessage() );
374
+ } else {
375
+ Mollie_WC_Plugin::debug( $this->id . ': Failed to create payment for order ' . $order->get_id() . ': ' . $e->getMessage() );
376
+ }
377
 
378
  /* translators: Placeholder 1: Payment method title */
379
  $message = sprintf(__('Could not create %s payment.', 'mollie-payments-for-woocommerce'), $this->title);
395
  */
396
  protected function saveMollieInfo($order, $payment)
397
  {
398
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
399
+ // Set active Mollie payment
400
+ Mollie_WC_Plugin::getDataHelper()->setActiveMolliePayment($order->id, $payment);
401
+
402
+ // Set Mollie customer
403
+ Mollie_WC_Plugin::getDataHelper()->setUserMollieCustomerId($order->customer_user, $payment->customerId);
404
+ } else {
405
+ // Set active Mollie payment
406
+ Mollie_WC_Plugin::getDataHelper()->setActiveMolliePayment($order->get_id(), $payment);
407
+
408
+ // Set Mollie customer
409
+ Mollie_WC_Plugin::getDataHelper()->setUserMollieCustomerId($order->get_customer_id(), $payment->customerId);
410
+ }
411
  }
412
 
413
  /**
426
  $return_url = $this->getReturnUrl($order);
427
  $webhook_url = $this->getWebhookUrl($order);
428
 
429
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
430
+ $payment_description = strtr($payment_description, array(
431
+ '{order_number}' => $order->get_order_number(),
432
+ '{order_date}' => date_i18n(wc_date_format(), strtotime($order->order_date)),
433
+ ));
434
+ } else {
435
+ $payment_description = strtr($payment_description, array(
436
+ '{order_number}' => $order->get_order_number(),
437
+ '{order_date}' => date_i18n(wc_date_format(), $order->get_date_created()->getTimestamp()),
438
+ ));
439
+ }
440
+
441
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
442
+ $paymentRequestData = array(
443
+ 'amount' => $order->get_total(),
444
+ 'description' => $payment_description,
445
+ 'redirectUrl' => $return_url,
446
+ 'webhookUrl' => $webhook_url,
447
+ 'method' => $mollie_method,
448
+ 'issuer' => $selected_issuer,
449
+ 'locale' => $payment_locale,
450
+ 'billingAddress' => $order->billing_address_1,
451
+ 'billingCity' => $order->billing_city,
452
+ 'billingRegion' => $order->billing_state,
453
+ 'billingPostal' => $order->billing_postcode,
454
+ 'billingCountry' => $order->billing_country,
455
+ 'shippingAddress' => $order->shipping_address_1,
456
+ 'shippingCity' => $order->shipping_city,
457
+ 'shippingRegion' => $order->shipping_state,
458
+ 'shippingPostal' => $order->shipping_postcode,
459
+ 'shippingCountry' => $order->shipping_country,
460
+ 'metadata' => array(
461
+ 'order_id' => $order->id,
462
+ ),
463
+ );
464
+ } else {
465
+ $paymentRequestData = array(
466
+ 'amount' => $order->get_total(),
467
+ 'description' => $payment_description,
468
+ 'redirectUrl' => $return_url,
469
+ 'webhookUrl' => $webhook_url,
470
+ 'method' => $mollie_method,
471
+ 'issuer' => $selected_issuer,
472
+ 'locale' => $payment_locale,
473
+ 'billingAddress' => $order->get_billing_address_1(),
474
+ 'billingCity' => $order->get_billing_city(),
475
+ 'billingRegion' => $order->get_billing_state(),
476
+ 'billingPostal' => $order->get_billing_postcode(),
477
+ 'billingCountry' => $order->get_billing_country(),
478
+ 'shippingAddress' => $order->get_shipping_address_1(),
479
+ 'shippingCity' => $order->get_shipping_city(),
480
+ 'shippingRegion' => $order->get_shipping_state(),
481
+ 'shippingPostal' => $order->get_shipping_postcode(),
482
+ 'shippingCountry' => $order->get_shipping_country(),
483
+ 'metadata' => array(
484
+ 'order_id' => $order->get_id(),
485
+ ),
486
+ );
487
+ }
488
 
489
  if ($store_customer)
490
  $paymentRequestData['customerId'] = $customer_id;
500
  */
501
  protected function getUserMollieCustomerId($order, $test_mode)
502
  {
503
+ $order_customer_id = ( version_compare( WC_VERSION, '3.0', '<' ) ) ? $order->customer_user : $order->get_customer_id();
504
+
505
+ return Mollie_WC_Plugin::getDataHelper()->getUserMollieCustomerId($order_customer_id, $test_mode);
506
  }
507
 
508
  /**
530
  {
531
  $order->update_status($new_status, $note);
532
 
533
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
 
 
 
 
 
 
534
 
535
+ switch ($new_status)
536
+ {
537
+ case self::STATUS_ON_HOLD:
538
+ if (!get_post_meta($order->id, '_order_stock_reduced', $single = true))
539
+ {
540
+ // Reduce order stock
541
+ $order->reduce_order_stock();
542
 
543
+ Mollie_WC_Plugin::debug(__METHOD__ . ": Stock for order {$order->id} reduced.");
544
+ }
545
 
546
+ break;
 
 
 
 
 
 
547
 
548
+ case self::STATUS_PENDING:
549
+ case self::STATUS_FAILED:
550
+ case self::STATUS_CANCELLED:
551
+ if (get_post_meta($order->id, '_order_stock_reduced', $single = true))
552
+ {
553
+ // Restore order stock
554
+ Mollie_WC_Plugin::getDataHelper()->restoreOrderStock($order);
555
 
556
+ Mollie_WC_Plugin::debug(__METHOD__ . " Stock for order {$order->id} restored.");
557
+ }
558
+
559
+ break;
560
+ }
561
+
562
+ } else {
563
+
564
+ switch ($new_status)
565
+ {
566
+ case self::STATUS_ON_HOLD:
567
+ if ( ! $order->get_meta( '_order_stock_reduced', true ) )
568
+ {
569
+ // Reduce order stock
570
+ wc_reduce_stock_levels( $order->get_id() );
571
+
572
+ Mollie_WC_Plugin::debug(__METHOD__ . ": Stock for order {$order->get_id()} reduced.");
573
+ }
574
+
575
+ break;
576
+
577
+ case self::STATUS_PENDING:
578
+ case self::STATUS_FAILED:
579
+ case self::STATUS_CANCELLED:
580
+ if ( $order->get_meta( '_order_stock_reduced', true ) )
581
+ {
582
+ // Restore order stock
583
+ Mollie_WC_Plugin::getDataHelper()->restoreOrderStock($order);
584
+
585
+ Mollie_WC_Plugin::debug(__METHOD__ . " Stock for order {$order->get_id()} restored.");
586
+ }
587
+
588
+ break;
589
+ }
590
+
591
+ }
592
  }
593
 
594
 
673
  return;
674
  }
675
 
676
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
677
+ Mollie_WC_Plugin::debug($this->id . ": Mollie payment {$payment->id} (" . $payment->mode . ") webhook call for order {$order->id}.", true);
678
+ } else {
679
+ Mollie_WC_Plugin::debug($this->id . ": Mollie payment {$payment->id} (" . $payment->mode . ") webhook call for order {$order->get_id()}.", true);
680
+ }
681
 
682
  $method_name = 'onWebhook' . ucfirst($payment->status);
683
 
703
  * @param $order
704
  * @param $payment
705
  */
706
+ protected function handlePayedOrderWebhook( $order, $payment ) {
707
+ // Duplicate webhook call
708
+ Mollie_WC_Plugin::setHttpResponseCode( 204 );
 
 
709
 
710
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
711
+ $order_id = $order->id;
712
+ } else {
713
+ $order = Mollie_WC_Plugin::getDataHelper()->getWcOrder( $order );
714
+ $order_id = $order->get_id();
715
+ }
716
+
717
+ Mollie_WC_Plugin::debug( $this->id . ": Order $order_id does not need a payment (payment webhook {$payment->id}).", true );
718
+
719
+ }
720
 
721
  /**
722
  * @param $payment
729
  }
730
 
731
  /**
732
+ * @param WC_Order $order
733
  * @param Mollie_API_Object_Payment $payment
734
  */
735
+ protected function onWebhookPaid(WC_Order $order, Mollie_API_Object_Payment $payment)
736
  {
737
  Mollie_WC_Plugin::debug(__METHOD__ . ' called.');
738
 
739
+ // WooCommerce 2.2.0 has the option to store the Payment transaction id.
740
  $woo_version = get_option('woocommerce_version', 'Unknown');
741
 
742
  if (version_compare($woo_version, '2.2.0', '>='))
772
 
773
 
774
  /**
775
+ * @param WC_Order $order
776
  * @param Mollie_API_Object_Payment $payment
777
  */
778
+ protected function onWebhookCancelled(WC_Order $order, Mollie_API_Object_Payment $payment)
779
  {
780
  Mollie_WC_Plugin::debug(__METHOD__ . ' called.');
781
 
782
+ // Unset active Mollie payment id
783
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
784
+ Mollie_WC_Plugin::getDataHelper()
785
+ ->unsetActiveMolliePayment($order->id)
786
+ ->setCancelledMolliePaymentId($order->id, $payment->id);
787
+ } else {
788
+ Mollie_WC_Plugin::getDataHelper()
789
+ ->unsetActiveMolliePayment($order->get_id())
790
+ ->setCancelledMolliePaymentId($order->get_id(), $payment->id);
791
+ }
792
 
793
  // New order status
794
  $new_order_status = self::STATUS_PENDING;
814
  }
815
 
816
  /**
817
+ * @param WC_Order $order
818
  * @param Mollie_API_Object_Payment $payment
819
  */
820
+ protected function onWebhookExpired(WC_Order $order, Mollie_API_Object_Payment $payment)
821
  {
822
  Mollie_WC_Plugin::debug(__METHOD__ . ' called.');
823
 
851
  {
852
  $data_helper = Mollie_WC_Plugin::getDataHelper();
853
 
854
+ $hasCancelledMolliePayment = ( version_compare( WC_VERSION, '3.0', '<' ) ) ? $data_helper->hasCancelledMolliePayment($order->id) : $data_helper->hasCancelledMolliePayment($order->get_id());;
855
+
856
+ if ($hasCancelledMolliePayment)
857
  {
858
  Mollie_WC_Plugin::addNotice(__('You have cancelled your payment. Please complete your order with a different payment method.', 'mollie-payments-for-woocommerce'));
859
 
980
  */
981
  public function displayInstructions(WC_Order $order, $admin_instructions = false, $plain_text = false)
982
  {
983
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
984
+ $order_payment_method = $order->payment_method;
985
+ } else {
986
+ $order_payment_method = $order->get_payment_method();
987
+ }
988
+
989
  // Invalid gateway
990
+ if ($this->id !== $order_payment_method)
991
  {
992
  return;
993
  }
994
 
995
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
996
+ $payment = Mollie_WC_Plugin::getDataHelper()->getActiveMolliePayment($order->id);
997
+ } else {
998
+ $payment = Mollie_WC_Plugin::getDataHelper()->getActiveMolliePayment($order->get_id());
999
+ }
1000
 
1001
  // Mollie payment not found or invalid gateway
1002
  if (!$payment || $payment->method != $this->getMollieMethodId())
1120
  $site_url = get_site_url();
1121
 
1122
  $return_url = WC()->api_request_url('mollie_return');
1123
+
1124
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
1125
+ $return_url = add_query_arg(array(
1126
+ 'order_id' => $order->id,
1127
+ 'key' => $order->order_key,
1128
+ ), $return_url);
1129
+ } else {
1130
+ $return_url = add_query_arg(array(
1131
+ 'order_id' => $order->get_id(),
1132
+ 'key' => $order->get_order_key(),
1133
+ ), $return_url);
1134
+ }
1135
 
1136
  $lang_url = $this->getSiteUrlWithLanguage();
1137
  $return_url = str_replace($site_url, $lang_url, $return_url);
1148
  $site_url = get_site_url();
1149
 
1150
  $webhook_url = WC()->api_request_url(strtolower(get_class($this)));
1151
+
1152
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
1153
+ $webhook_url = add_query_arg(array(
1154
+ 'order_id' => $order->id,
1155
+ 'key' => $order->order_key,
1156
+ ), $webhook_url);
1157
+ } else {
1158
+ $webhook_url = add_query_arg(array(
1159
+ 'order_id' => $order->get_id(),
1160
+ 'key' => $order->get_order_key(),
1161
+ ), $webhook_url);
1162
+ }
1163
 
1164
  $lang_url = $this->getSiteUrlWithLanguage();
1165
  $webhook_url = str_replace($site_url, $lang_url, $webhook_url);
includes/mollie/wc/gateway/abstractseparecurring.php CHANGED
@@ -2,7 +2,7 @@
2
  abstract class Mollie_WC_Gateway_AbstractSepaRecurring extends Mollie_WC_Gateway_AbstractSubscription
3
  {
4
 
5
- const WAITING_CONFIRMATION_PERIOD_DAYS = '15';
6
 
7
  protected $recurringMollieMethod = null;
8
 
@@ -54,12 +54,12 @@ abstract class Mollie_WC_Gateway_AbstractSepaRecurring extends Mollie_WC_Gateway
54
  */
55
  protected function _updateScheduledPaymentOrder($renewal_order, $initial_order_status, $payment)
56
  {
57
- $this->updateOrderStatus(
58
- $renewal_order,
59
- self::STATUS_COMPLETED,
60
- __("Awaiting payment confirmation. For %s Days", 'mollie-payments-for-woocommerce') . "\n",
61
- self::WAITING_CONFIRMATION_PERIOD_DAYS
62
- );
63
 
64
  $paymentMethodTitle = $this->getPaymentMethodTitle($payment);
65
 
@@ -84,13 +84,24 @@ abstract class Mollie_WC_Gateway_AbstractSepaRecurring extends Mollie_WC_Gateway
84
  $period = 'P'.self::WAITING_CONFIRMATION_PERIOD_DAYS . 'D';
85
  $confirmationDate->add(new DateInterval($period));
86
 
87
- $wpdb->insert(
88
- $wpdb->mollie_pending_payment,
89
- array(
90
- 'post_id' => $renewal_order->id,
91
- 'expired_time' => $confirmationDate->getTimestamp(),
92
- )
93
- );
 
 
 
 
 
 
 
 
 
 
 
94
  }
95
 
96
  /**
@@ -99,12 +110,24 @@ abstract class Mollie_WC_Gateway_AbstractSepaRecurring extends Mollie_WC_Gateway
99
  protected function deleteOrderFromPendingPaymentQueue($order)
100
  {
101
  global $wpdb;
102
- $wpdb->delete(
103
- $wpdb->mollie_pending_payment,
104
- array(
105
- 'post_id' => $order->id,
106
- )
107
- );
 
 
 
 
 
 
 
 
 
 
 
 
108
  }
109
 
110
  /**
@@ -114,9 +137,15 @@ abstract class Mollie_WC_Gateway_AbstractSepaRecurring extends Mollie_WC_Gateway
114
  protected function onWebhookPaid(WC_Order $order, Mollie_API_Object_Payment $payment)
115
  {
116
  parent::onWebhookPaid($order, $payment);
117
- if ($this->is_subscription($order->id)) {
118
- $this->deleteOrderFromPendingPaymentQueue($order);
119
- }
 
 
 
 
 
 
120
  }
121
 
122
  /**
@@ -126,10 +155,15 @@ abstract class Mollie_WC_Gateway_AbstractSepaRecurring extends Mollie_WC_Gateway
126
  protected function onWebhookCancelled(WC_Order $order, Mollie_API_Object_Payment $payment)
127
  {
128
  parent::onWebhookCancelled($order, $payment);
129
-
130
- if ($this->is_subscription($order->id)) {
131
- $this->deleteOrderFromPendingPaymentQueue($order);
132
- }
 
 
 
 
 
133
  }
134
 
135
  /**
@@ -139,10 +173,15 @@ abstract class Mollie_WC_Gateway_AbstractSepaRecurring extends Mollie_WC_Gateway
139
  protected function onWebhookExpired(WC_Order $order, Mollie_API_Object_Payment $payment)
140
  {
141
  parent::onWebhookExpired($order, $payment);
142
-
143
- if ($this->is_subscription($order->id)) {
144
- $this->deleteOrderFromPendingPaymentQueue($order);
145
- }
 
 
 
 
 
146
  }
147
 
148
  /**
@@ -166,20 +205,37 @@ abstract class Mollie_WC_Gateway_AbstractSepaRecurring extends Mollie_WC_Gateway
166
  */
167
  protected function handlePayedOrderWebhook($order, $payment)
168
  {
169
- // Duplicate webhook call
170
- if ($this->is_subscription($order->id) && isset($payment->recurringType) && $payment->recurringType == 'recurring') {
171
- $paymentMethodTitle = $this->getPaymentMethodTitle($payment);
172
-
173
- $order->add_order_note(sprintf(
174
- /* translators: Placeholder 1: payment method title, placeholder 2: payment ID */
175
- __('Order completed using %s payment (%s).', 'mollie-payments-for-woocommerce'),
176
- $paymentMethodTitle,
177
- $payment->id . ($payment->mode == 'test' ? (' - ' . __('test mode', 'mollie-payments-for-woocommerce')) : '')
178
- ));
179
-
180
- $this->deleteOrderFromPendingPaymentQueue($order);
181
- return;
182
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
 
184
  parent::handlePayedOrderWebhook($order, $payment);
185
 
@@ -195,7 +251,7 @@ abstract class Mollie_WC_Gateway_AbstractSepaRecurring extends Mollie_WC_Gateway
195
  $orderId = $payment->metadata->order_id;
196
 
197
  // First payment was made by one gateway, and the next from another.
198
- // For Example Recurring First with IDEAL, the second With Sepa Direct Debit
199
  if ($orderId && $this->is_subscription($orderId)){
200
  $isValidPaymentMethod = in_array($payment->method, array($this->getMollieMethodId(),$this->getRecurringMollieMethodId()));
201
  }
2
  abstract class Mollie_WC_Gateway_AbstractSepaRecurring extends Mollie_WC_Gateway_AbstractSubscription
3
  {
4
 
5
+ const WAITING_CONFIRMATION_PERIOD_DAYS = '21';
6
 
7
  protected $recurringMollieMethod = null;
8
 
54
  */
55
  protected function _updateScheduledPaymentOrder($renewal_order, $initial_order_status, $payment)
56
  {
57
+ $this->updateOrderStatus(
58
+ $renewal_order,
59
+ $initial_order_status,
60
+ sprintf( __( "Awaiting payment confirmation. For %s days", 'mollie-payments-for-woocommerce' ) . "\n",
61
+ self::WAITING_CONFIRMATION_PERIOD_DAYS )
62
+ );
63
 
64
  $paymentMethodTitle = $this->getPaymentMethodTitle($payment);
65
 
84
  $period = 'P'.self::WAITING_CONFIRMATION_PERIOD_DAYS . 'D';
85
  $confirmationDate->add(new DateInterval($period));
86
 
87
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
88
+ $wpdb->insert(
89
+ $wpdb->mollie_pending_payment,
90
+ array(
91
+ 'post_id' => $renewal_order->id,
92
+ 'expired_time' => $confirmationDate->getTimestamp(),
93
+ )
94
+ );
95
+ } else {
96
+ $wpdb->insert(
97
+ $wpdb->mollie_pending_payment,
98
+ array(
99
+ 'post_id' => $renewal_order->get_id(),
100
+ 'expired_time' => $confirmationDate->getTimestamp(),
101
+ )
102
+ );
103
+ }
104
+
105
  }
106
 
107
  /**
110
  protected function deleteOrderFromPendingPaymentQueue($order)
111
  {
112
  global $wpdb;
113
+
114
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
115
+ $wpdb->delete(
116
+ $wpdb->mollie_pending_payment,
117
+ array(
118
+ 'post_id' => $order->id,
119
+ )
120
+ );
121
+
122
+ } else {
123
+ $wpdb->delete(
124
+ $wpdb->mollie_pending_payment,
125
+ array(
126
+ 'post_id' => $order->get_id(),
127
+ )
128
+ );
129
+
130
+ }
131
  }
132
 
133
  /**
137
  protected function onWebhookPaid(WC_Order $order, Mollie_API_Object_Payment $payment)
138
  {
139
  parent::onWebhookPaid($order, $payment);
140
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
141
+ if ($this->is_subscription($order->id)) {
142
+ $this->deleteOrderFromPendingPaymentQueue($order);
143
+ }
144
+ } else {
145
+ if ($this->is_subscription($order->get_id())) {
146
+ $this->deleteOrderFromPendingPaymentQueue($order);
147
+ }
148
+ }
149
  }
150
 
151
  /**
155
  protected function onWebhookCancelled(WC_Order $order, Mollie_API_Object_Payment $payment)
156
  {
157
  parent::onWebhookCancelled($order, $payment);
158
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
159
+ if ($this->is_subscription($order->id)) {
160
+ $this->deleteOrderFromPendingPaymentQueue($order);
161
+ }
162
+ } else {
163
+ if ($this->is_subscription($order->get_id())) {
164
+ $this->deleteOrderFromPendingPaymentQueue($order);
165
+ }
166
+ }
167
  }
168
 
169
  /**
173
  protected function onWebhookExpired(WC_Order $order, Mollie_API_Object_Payment $payment)
174
  {
175
  parent::onWebhookExpired($order, $payment);
176
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
177
+ if ($this->is_subscription($order->id)) {
178
+ $this->deleteOrderFromPendingPaymentQueue($order);
179
+ }
180
+ } else {
181
+ if ($this->is_subscription($order->get_id())) {
182
+ $this->deleteOrderFromPendingPaymentQueue($order);
183
+ }
184
+ }
185
  }
186
 
187
  /**
205
  */
206
  protected function handlePayedOrderWebhook($order, $payment)
207
  {
208
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
209
+ // Duplicate webhook call
210
+ if ($this->is_subscription($order->id) && isset($payment->recurringType) && $payment->recurringType == 'recurring') {
211
+ $paymentMethodTitle = $this->getPaymentMethodTitle($payment);
212
+
213
+ $order->add_order_note(sprintf(
214
+ /* translators: Placeholder 1: payment method title, placeholder 2: payment ID */
215
+ __('Order completed using %s payment (%s).', 'mollie-payments-for-woocommerce'),
216
+ $paymentMethodTitle,
217
+ $payment->id . ($payment->mode == 'test' ? (' - ' . __('test mode', 'mollie-payments-for-woocommerce')) : '')
218
+ ));
219
+
220
+ $this->deleteOrderFromPendingPaymentQueue($order);
221
+ return;
222
+ }
223
+ } else {
224
+ // Duplicate webhook call
225
+ if ($this->is_subscription($order->get_id()) && isset($payment->recurringType) && $payment->recurringType == 'recurring') {
226
+ $paymentMethodTitle = $this->getPaymentMethodTitle($payment);
227
+
228
+ $order->add_order_note(sprintf(
229
+ /* translators: Placeholder 1: payment method title, placeholder 2: payment ID */
230
+ __('Order completed using %s payment (%s).', 'mollie-payments-for-woocommerce'),
231
+ $paymentMethodTitle,
232
+ $payment->id . ($payment->mode == 'test' ? (' - ' . __('test mode', 'mollie-payments-for-woocommerce')) : '')
233
+ ));
234
+
235
+ $this->deleteOrderFromPendingPaymentQueue($order);
236
+ return;
237
+ }
238
+ }
239
 
240
  parent::handlePayedOrderWebhook($order, $payment);
241
 
251
  $orderId = $payment->metadata->order_id;
252
 
253
  // First payment was made by one gateway, and the next from another.
254
+ // For Example Recurring First with IDEAL, the second With SEPA Direct Debit
255
  if ($orderId && $this->is_subscription($orderId)){
256
  $isValidPaymentMethod = in_array($payment->method, array($this->getMollieMethodId(),$this->getRecurringMollieMethodId()));
257
  }
includes/mollie/wc/gateway/abstractsubscription.php CHANGED
@@ -31,10 +31,11 @@ abstract class Mollie_WC_Gateway_AbstractSubscription extends Mollie_WC_Gateway_
31
  {
32
  $supportSubscriptions = array(
33
  'subscriptions',
34
- 'subscription_suspension',
35
- 'subscription_reactivation',
36
- 'subscription_cancellation',
37
- 'subscription_date_changes',
 
38
  'multiple_subscriptions',
39
  );
40
 
@@ -81,25 +82,48 @@ abstract class Mollie_WC_Gateway_AbstractSubscription extends Mollie_WC_Gateway_
81
  $return_url = $this->getReturnUrl($order);
82
  $webhook_url = $this->getWebhookUrl($order);
83
 
84
- $payment_description = strtr($payment_description, array(
85
- '{order_number}' => $order->get_order_number(),
86
- '{order_date}' => date_i18n(wc_date_format(), strtotime($order->order_date)),
87
- ));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
 
89
- $data = array_filter(array(
90
- 'amount' => $order->get_total(),
91
- 'description' => $payment_description,
92
- 'redirectUrl' => $return_url,
93
- 'webhookUrl' => $webhook_url,
94
- 'method' => $mollie_method,
95
- 'issuer' => $selected_issuer,
96
- 'locale' => $payment_locale,
97
- 'metadata' => array(
98
- 'order_id' => $order->id,
99
- ),
100
- 'recurringType' => 'recurring',
101
- 'customerId' => $customer_id,
102
- ));
103
  return $data;
104
  }
105
 
@@ -109,16 +133,29 @@ abstract class Mollie_WC_Gateway_AbstractSubscription extends Mollie_WC_Gateway_
109
  */
110
  protected function saveMollieInfo($order, $payment)
111
  {
112
-
113
- if (!$this->is_subscription($order->id)){
114
- parent::saveMollieInfo($order,$payment);
115
- return;
116
- }
117
- // Set active Mollie payment
118
- $this->setActiveMolliePayment($order->id, $payment);
119
-
120
- // Set Mollie customer
121
- $this->setUserMollieCustomerId($order->id, $payment->customerId);
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  }
123
 
124
  /**
@@ -131,14 +168,22 @@ abstract class Mollie_WC_Gateway_AbstractSubscription extends Mollie_WC_Gateway_
131
  {
132
  if (!$renewal_order)
133
  {
134
- Mollie_WC_Plugin::debug($this->id . ': Could not process payment, order ' . $renewal_order->id . ' not found.');
 
 
 
 
 
135
 
136
- Mollie_WC_Plugin::addNotice(sprintf(__('Could not load order %s', 'mollie-payments-for-woocommerce'), $renewal_order->id), 'error');
 
137
 
138
  return array('result' => 'failure');
139
  }
140
 
141
- Mollie_WC_Plugin::debug($this->id . ': Try to create payment for order ' . $renewal_order->id);
 
 
142
  $initial_order_status = $this->getInitialOrderStatus();
143
 
144
  // Overwrite plugin-wide
@@ -158,14 +203,14 @@ abstract class Mollie_WC_Gateway_AbstractSubscription extends Mollie_WC_Gateway_
158
  $test_mode = $this->isTestModeEnabledForRenewalOrder($renewal_order);
159
  try
160
  {
161
- Mollie_WC_Plugin::debug($this->id . ': Create payment for order ' . $renewal_order->id);
162
 
163
  do_action(Mollie_WC_Plugin::PLUGIN_ID . '_create_payment', $data, $renewal_order);
164
  $payment = null;
165
  // Create Mollie payment with customer id.
166
  try
167
  {
168
- Mollie_WC_Plugin::debug($this->id . ': Fetch mandate' . $renewal_order->id);
169
  $mandates = Mollie_WC_Plugin::getApiHelper()->getApiClient($test_mode)->customers_mandates->withParentId($customer_id)->all();
170
  $validMandate = false;
171
  foreach ($mandates as $mandate) {
@@ -176,10 +221,10 @@ abstract class Mollie_WC_Gateway_AbstractSubscription extends Mollie_WC_Gateway_
176
  }
177
  }
178
  if ($validMandate){
179
- Mollie_WC_Plugin::debug($this->id . ': Valid mandate ' . $renewal_order->id);
180
  $payment = Mollie_WC_Plugin::getApiHelper()->getApiClient($test_mode)->payments->create($data);
181
  } else {
182
- Mollie_WC_Plugin::debug($this->id . 'Payment problem ' . $renewal_order->id);
183
  throw new Mollie_API_Exception(__('Payment cannot be processed.', 'mollie-payments-for-woocommerce-mandate-problem'));
184
  }
185
  }
@@ -194,17 +239,17 @@ abstract class Mollie_WC_Gateway_AbstractSubscription extends Mollie_WC_Gateway_
194
  unset($data['customerId']);
195
  $payment = Mollie_WC_Plugin::getApiHelper()->getApiClient($test_mode)->payments->create($data);
196
  }
197
- Mollie_WC_Plugin::debug($this->id . ': Created payment for order ' . $renewal_order->id. ' payment json response '.json_encode($payment));
198
- Mollie_WC_Plugin::getDataHelper()->unsetActiveMolliePayment($renewal_order->id);
199
  // Set active Mollie payment
200
- Mollie_WC_Plugin::getDataHelper()->setActiveMolliePayment($renewal_order->id, $payment);
201
 
202
  // Set Mollie customer
203
- $this->setUserMollieCustomerId($renewal_order->id, $payment->customerId);
204
 
205
  do_action(Mollie_WC_Plugin::PLUGIN_ID . '_payment_created', $payment, $renewal_order);
206
 
207
- Mollie_WC_Plugin::debug($this->id . ': Payment ' . $payment->id . ' (' . $payment->mode . ') created for order ' . $renewal_order->id);
208
 
209
  // Set initial status
210
  // Status is only updated if the new status is not the same as the default order status (pending)
@@ -217,7 +262,7 @@ abstract class Mollie_WC_Gateway_AbstractSubscription extends Mollie_WC_Gateway_
217
  }
218
  catch (Mollie_API_Exception $e)
219
  {
220
- Mollie_WC_Plugin::debug($this->id . ': Failed to create payment for order ' . $renewal_order->id . ': ' . $e->getMessage());
221
 
222
  /* translators: Placeholder 1: Payment method title */
223
  $message = sprintf(__('Could not create %s payment.', 'mollie-payments-for-woocommerce'), $this->title);
@@ -237,17 +282,32 @@ abstract class Mollie_WC_Gateway_AbstractSubscription extends Mollie_WC_Gateway_
237
  {
238
  $result = false;
239
  $subscriptions = array();
240
- if ( wcs_order_contains_renewal( $order->id) ) {
241
- $subscriptions = wcs_get_subscriptions_for_renewal_order( $order->id );
242
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
243
 
244
- foreach( $subscriptions as $subscription ) {
245
- $paymentMode = get_post_meta( $subscription->id, '_mollie_payment_mode', true );
246
- if ($paymentMode == self::PAYMENT_TEST_MODE){
247
- $result = true;
248
- break;
249
- }
250
- }
251
  return $result;
252
  }
253
  /**
@@ -257,36 +317,75 @@ abstract class Mollie_WC_Gateway_AbstractSubscription extends Mollie_WC_Gateway_
257
  */
258
  public function setActiveMolliePayment ($order_id, Mollie_API_Object_Payment $payment)
259
  {
260
- add_post_meta($order_id, '_mollie_payment_id', $payment->id, $single = true);
261
- add_post_meta($order_id, '_mollie_payment_mode', $payment->mode, $single = true);
262
 
263
- delete_post_meta($order_id, '_mollie_cancelled_payment_id');
264
-
265
- if ($payment->customerId)
266
- {
267
- add_post_meta($order_id, '_mollie_customer_id', $payment->customerId, $single = true);
268
- }
269
-
270
- // Also store it on the subscriptions being purchased or paid for in the order
271
- if ( wcs_order_contains_subscription( $order_id) ) {
272
- $subscriptions = wcs_get_subscriptions_for_order( $order_id);
273
- } elseif ( wcs_order_contains_renewal( $order_id) ) {
274
- $subscriptions = wcs_get_subscriptions_for_renewal_order( $order_id );
275
- } else {
276
- $subscriptions = array();
277
- }
278
-
279
- foreach( $subscriptions as $subscription ) {
280
- $this->unsetActiveMolliePayment($subscription->id);
281
- delete_post_meta($subscription->id, '_mollie_customer_id');
282
- add_post_meta( $subscription->id, '_mollie_payment_id', $payment->id, $single = true );
283
- add_post_meta( $subscription->id, '_mollie_payment_mode', $payment->mode, $single = true );
284
- delete_post_meta($subscription->id, '_mollie_cancelled_payment_id');
285
- if ($payment->customerId)
286
- {
287
- add_post_meta($subscription->id, '_mollie_customer_id', $payment->customerId, $single = true);
288
- }
289
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
290
 
291
  return $this;
292
  }
@@ -297,8 +396,15 @@ abstract class Mollie_WC_Gateway_AbstractSubscription extends Mollie_WC_Gateway_
297
  */
298
  public function unsetActiveMolliePayment ($order_id)
299
  {
300
- delete_post_meta($order_id, '_mollie_payment_id');
301
- delete_post_meta($order_id, '_mollie_payment_mode');
 
 
 
 
 
 
 
302
 
303
  return $this;
304
  }
@@ -312,7 +418,13 @@ abstract class Mollie_WC_Gateway_AbstractSubscription extends Mollie_WC_Gateway_
312
  {
313
  if (!empty($customer_id))
314
  {
315
- update_post_meta($orderId, '_mollie_customer_id', $customer_id);
 
 
 
 
 
 
316
  }
317
 
318
  return $this;
@@ -325,7 +437,12 @@ abstract class Mollie_WC_Gateway_AbstractSubscription extends Mollie_WC_Gateway_
325
  */
326
  protected function getUserMollieCustomerId($order, $test_mode = false)
327
  {
328
- $user_id = $order->customer_user;
 
 
 
 
 
329
  if (empty($user_id)){
330
  return null;
331
  }
@@ -369,7 +486,12 @@ abstract class Mollie_WC_Gateway_AbstractSubscription extends Mollie_WC_Gateway_
369
  */
370
  public function getOrderMollieCustomerId($order)
371
  {
372
- $customerId = get_post_meta( $order->id, '_mollie_customer_id', true );
 
 
 
 
 
373
  return $customerId;
374
  }
375
 
@@ -408,10 +530,19 @@ abstract class Mollie_WC_Gateway_AbstractSubscription extends Mollie_WC_Gateway_
408
  */
409
  public function delete_renewal_meta( $renewal_order )
410
  {
411
- delete_post_meta( $renewal_order->id, '_mollie_card_4_digits' );
412
- delete_post_meta( $renewal_order->id, '_mollie_payment_id' );
413
- delete_post_meta( $renewal_order->id, '_mollie_payment_mode' );
414
- delete_post_meta( $renewal_order->id, '_mollie_cancelled_payment_id' );
 
 
 
 
 
 
 
 
 
415
  return $renewal_order;
416
  }
417
 
@@ -422,22 +553,41 @@ abstract class Mollie_WC_Gateway_AbstractSubscription extends Mollie_WC_Gateway_
422
  */
423
  public function add_subscription_payment_meta( $payment_meta, $subscription )
424
  {
425
- $payment_meta[ $this->id ] = array(
426
- 'post_meta' => array(
427
- '_mollie_payment_id' => array(
428
- 'value' => get_post_meta( $subscription->id, '_mollie_payment_id', true ),
429
- 'label' => 'Mollie Payment ID',
430
- ),
431
- '_mollie_payment_mode' => array(
432
- 'value' => get_post_meta( $subscription->id, '_mollie_payment_mode', true ),
433
- 'label' => 'Mollie Payment Mode',
434
- ),
435
- '_mollie_customer_id' => array(
436
- 'value' => get_post_meta( $subscription->id, '_mollie_customer_id', true ),
437
- 'label' => 'Mollie Customer ID',
438
- ),
439
- ),
440
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
441
  return $payment_meta;
442
  }
443
 
@@ -462,8 +612,15 @@ abstract class Mollie_WC_Gateway_AbstractSubscription extends Mollie_WC_Gateway_
462
  */
463
  public function update_failing_payment_method( $subscription, $renewal_order )
464
  {
465
- update_post_meta( $subscription->id, '_mollie_customer_id', $renewal_order->mollie_customer_id );
466
- update_post_meta( $subscription->id, '_mollie_payment_id', $renewal_order->mollie_payment_id );
 
 
 
 
 
 
 
467
  }
468
 
469
  /**
31
  {
32
  $supportSubscriptions = array(
33
  'subscriptions',
34
+ 'subscription_cancellation',
35
+ 'subscription_suspension',
36
+ 'subscription_reactivation',
37
+ 'subscription_amount_changes',
38
+ 'subscription_date_changes',
39
  'multiple_subscriptions',
40
  );
41
 
82
  $return_url = $this->getReturnUrl($order);
83
  $webhook_url = $this->getWebhookUrl($order);
84
 
85
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
86
+ $payment_description = strtr($payment_description, array(
87
+ '{order_number}' => $order->get_order_number(),
88
+ '{order_date}' => date_i18n(wc_date_format(), strtotime($order->order_date)),
89
+ ));
90
+
91
+ $data = array_filter(array(
92
+ 'amount' => $order->get_total(),
93
+ 'description' => $payment_description,
94
+ 'redirectUrl' => $return_url,
95
+ 'webhookUrl' => $webhook_url,
96
+ 'method' => $mollie_method,
97
+ 'issuer' => $selected_issuer,
98
+ 'locale' => $payment_locale,
99
+ 'metadata' => array(
100
+ 'order_id' => $order->id,
101
+ ),
102
+ 'recurringType' => 'recurring',
103
+ 'customerId' => $customer_id,
104
+ ));
105
+ } else {
106
+ $payment_description = strtr($payment_description, array(
107
+ '{order_number}' => $order->get_order_number(),
108
+ '{order_date}' => date_i18n(wc_date_format(), $order->get_date_created()->getTimestamp()),
109
+ ));
110
+
111
+ $data = array_filter(array(
112
+ 'amount' => $order->get_total(),
113
+ 'description' => $payment_description,
114
+ 'redirectUrl' => $return_url,
115
+ 'webhookUrl' => $webhook_url,
116
+ 'method' => $mollie_method,
117
+ 'issuer' => $selected_issuer,
118
+ 'locale' => $payment_locale,
119
+ 'metadata' => array(
120
+ 'order_id' => $order->get_id(),
121
+ ),
122
+ 'recurringType' => 'recurring',
123
+ 'customerId' => $customer_id,
124
+ ));
125
+ }
126
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  return $data;
128
  }
129
 
133
  */
134
  protected function saveMollieInfo($order, $payment)
135
  {
136
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
137
+ if ( ! $this->is_subscription( $order->id ) ) {
138
+ parent::saveMollieInfo( $order, $payment );
139
+
140
+ return;
141
+ }
142
+ // Set active Mollie payment
143
+ $this->setActiveMolliePayment( $order->id, $payment );
144
+
145
+ // Set Mollie customer
146
+ $this->setUserMollieCustomerId( $order->id, $payment->customerId );
147
+ } else {
148
+ if ( ! $this->is_subscription( $order->get_id() ) ) {
149
+ parent::saveMollieInfo( $order, $payment );
150
+
151
+ return;
152
+ }
153
+ // Set active Mollie payment
154
+ $this->setActiveMolliePayment( $order->get_id(), $payment );
155
+
156
+ // Set Mollie customer
157
+ $this->setUserMollieCustomerId( $order->get_id(), $payment->customerId );
158
+ }
159
  }
160
 
161
  /**
168
  {
169
  if (!$renewal_order)
170
  {
171
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
172
+ Mollie_WC_Plugin::debug($this->id . ': Could not process payment, order ' . $renewal_order->id . ' not found.');
173
+
174
+ Mollie_WC_Plugin::addNotice(sprintf(__('Could not load order %s', 'mollie-payments-for-woocommerce'), $renewal_order->id), 'error');
175
+ } else {
176
+ Mollie_WC_Plugin::debug($this->id . ': Could not process payment, order ' . $renewal_order->get_id() . ' not found.');
177
 
178
+ Mollie_WC_Plugin::addNotice(sprintf(__('Could not load order %s', 'mollie-payments-for-woocommerce'), $renewal_order->get_id()), 'error');
179
+ }
180
 
181
  return array('result' => 'failure');
182
  }
183
 
184
+ $renewal_order_id = ( version_compare( WC_VERSION, '3.0', '<' ) ) ? $renewal_order->id : $renewal_order->get_id();
185
+
186
+ Mollie_WC_Plugin::debug($this->id . ': Try to create payment for order ' . $renewal_order_id);
187
  $initial_order_status = $this->getInitialOrderStatus();
188
 
189
  // Overwrite plugin-wide
203
  $test_mode = $this->isTestModeEnabledForRenewalOrder($renewal_order);
204
  try
205
  {
206
+ Mollie_WC_Plugin::debug($this->id . ': Create payment for order ' . $renewal_order_id);
207
 
208
  do_action(Mollie_WC_Plugin::PLUGIN_ID . '_create_payment', $data, $renewal_order);
209
  $payment = null;
210
  // Create Mollie payment with customer id.
211
  try
212
  {
213
+ Mollie_WC_Plugin::debug($this->id . ': Fetch mandate' . $renewal_order_id);
214
  $mandates = Mollie_WC_Plugin::getApiHelper()->getApiClient($test_mode)->customers_mandates->withParentId($customer_id)->all();
215
  $validMandate = false;
216
  foreach ($mandates as $mandate) {
221
  }
222
  }
223
  if ($validMandate){
224
+ Mollie_WC_Plugin::debug($this->id . ': Valid mandate ' . $renewal_order_id);
225
  $payment = Mollie_WC_Plugin::getApiHelper()->getApiClient($test_mode)->payments->create($data);
226
  } else {
227
+ Mollie_WC_Plugin::debug($this->id . 'Payment problem ' . $renewal_order_id);
228
  throw new Mollie_API_Exception(__('Payment cannot be processed.', 'mollie-payments-for-woocommerce-mandate-problem'));
229
  }
230
  }
239
  unset($data['customerId']);
240
  $payment = Mollie_WC_Plugin::getApiHelper()->getApiClient($test_mode)->payments->create($data);
241
  }
242
+ Mollie_WC_Plugin::debug($this->id . ': Created payment for order ' . $renewal_order_id. ' payment json response '.json_encode($payment));
243
+ Mollie_WC_Plugin::getDataHelper()->unsetActiveMolliePayment($renewal_order_id);
244
  // Set active Mollie payment
245
+ Mollie_WC_Plugin::getDataHelper()->setActiveMolliePayment($renewal_order_id, $payment);
246
 
247
  // Set Mollie customer
248
+ $this->setUserMollieCustomerId($renewal_order_id, $payment->customerId);
249
 
250
  do_action(Mollie_WC_Plugin::PLUGIN_ID . '_payment_created', $payment, $renewal_order);
251
 
252
+ Mollie_WC_Plugin::debug($this->id . ': Payment ' . $payment->id . ' (' . $payment->mode . ') created for order ' . $renewal_order_id);
253
 
254
  // Set initial status
255
  // Status is only updated if the new status is not the same as the default order status (pending)
262
  }
263
  catch (Mollie_API_Exception $e)
264
  {
265
+ Mollie_WC_Plugin::debug($this->id . ': Failed to create payment for order ' . $renewal_order_id . ': ' . $e->getMessage());
266
 
267
  /* translators: Placeholder 1: Payment method title */
268
  $message = sprintf(__('Could not create %s payment.', 'mollie-payments-for-woocommerce'), $this->title);
282
  {
283
  $result = false;
284
  $subscriptions = array();
285
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
286
+ if ( wcs_order_contains_renewal( $order->id) ) {
287
+ $subscriptions = wcs_get_subscriptions_for_renewal_order( $order->id );
288
+ }
289
+
290
+ foreach( $subscriptions as $subscription ) {
291
+ $paymentMode = get_post_meta( $subscription->id, '_mollie_payment_mode', true );
292
+ if ($paymentMode == self::PAYMENT_TEST_MODE){
293
+ $result = true;
294
+ break;
295
+ }
296
+ }
297
+ } else {
298
+ if ( wcs_order_contains_renewal( $order->get_id()) ) {
299
+ $subscriptions = wcs_get_subscriptions_for_renewal_order( $order->get_id() );
300
+ }
301
+
302
+ foreach( $subscriptions as $subscription ) {
303
+ $paymentMode = $subscription->get_meta( '_mollie_payment_mode', true );
304
+ if ($paymentMode == self::PAYMENT_TEST_MODE){
305
+ $result = true;
306
+ break;
307
+ }
308
+ }
309
+ }
310
 
 
 
 
 
 
 
 
311
  return $result;
312
  }
313
  /**
317
  */
318
  public function setActiveMolliePayment ($order_id, Mollie_API_Object_Payment $payment)
319
  {
 
 
320
 
321
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
322
+
323
+ add_post_meta( $order_id, '_mollie_payment_id', $payment->id, $single = true );
324
+ add_post_meta( $order_id, '_mollie_payment_mode', $payment->mode, $single = true );
325
+
326
+ delete_post_meta( $order_id, '_mollie_cancelled_payment_id' );
327
+
328
+ if ( $payment->customerId ) {
329
+ add_post_meta( $order_id, '_mollie_customer_id', $payment->customerId, $single = true );
330
+ }
331
+
332
+ // Also store it on the subscriptions being purchased or paid for in the order
333
+ if ( wcs_order_contains_subscription( $order_id ) ) {
334
+ $subscriptions = wcs_get_subscriptions_for_order( $order_id );
335
+ } elseif ( wcs_order_contains_renewal( $order_id ) ) {
336
+ $subscriptions = wcs_get_subscriptions_for_renewal_order( $order_id );
337
+ } else {
338
+ $subscriptions = array ();
339
+ }
340
+
341
+ foreach ( $subscriptions as $subscription ) {
342
+ $this->unsetActiveMolliePayment( $subscription->id );
343
+ delete_post_meta( $subscription->id, '_mollie_customer_id' );
344
+ add_post_meta( $subscription->id, '_mollie_payment_id', $payment->id, $single = true );
345
+ add_post_meta( $subscription->id, '_mollie_payment_mode', $payment->mode, $single = true );
346
+ delete_post_meta( $subscription->id, '_mollie_cancelled_payment_id' );
347
+ if ( $payment->customerId ) {
348
+ add_post_meta( $subscription->id, '_mollie_customer_id', $payment->customerId, $single = true );
349
+ }
350
+ }
351
+
352
+ } else {
353
+
354
+ $order = Mollie_WC_Plugin::getDataHelper()->getWcOrder( $order_id );
355
+
356
+ $order->update_meta_data( '_mollie_payment_id', $payment->id );
357
+ $order->update_meta_data( '_mollie_payment_mode', $payment->mode );
358
+
359
+ $order->delete_meta_data( '_mollie_cancelled_payment_id' );
360
+
361
+ if ( $payment->customerId ) {
362
+ $order->update_meta_data( '_mollie_customer_id', $payment->customerId );
363
+ }
364
+
365
+ // Also store it on the subscriptions being purchased or paid for in the order
366
+ if ( wcs_order_contains_subscription( $order_id ) ) {
367
+ $subscriptions = wcs_get_subscriptions_for_order( $order_id );
368
+ } elseif ( wcs_order_contains_renewal( $order_id ) ) {
369
+ $subscriptions = wcs_get_subscriptions_for_renewal_order( $order_id );
370
+ } else {
371
+ $subscriptions = array ();
372
+ }
373
+
374
+ foreach ( $subscriptions as $subscription ) {
375
+ $this->unsetActiveMolliePayment( $subscription->get_id() );
376
+ $subscription->delete_meta_data( '_mollie_customer_id' );
377
+ $subscription->update_meta_data( '_mollie_payment_id', $payment->id );
378
+ $subscription->update_meta_data( '_mollie_payment_mode', $payment->mode );
379
+ $subscription->delete_meta_data( '_mollie_cancelled_payment_id' );
380
+ if ( $payment->customerId ) {
381
+ $subscription->update_meta_data( '_mollie_customer_id', $payment->customerId );
382
+ }
383
+ $subscription->save();
384
+ }
385
+
386
+ $order->save();
387
+
388
+ }
389
 
390
  return $this;
391
  }
396
  */
397
  public function unsetActiveMolliePayment ($order_id)
398
  {
399
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
400
+ delete_post_meta($order_id, '_mollie_payment_id');
401
+ delete_post_meta($order_id, '_mollie_payment_mode');
402
+ } else {
403
+ $order = Mollie_WC_Plugin::getDataHelper()->getWcOrder( $order_id );
404
+ $order->delete_meta_data( '_mollie_payment_id' );
405
+ $order->delete_meta_data( '_mollie_payment_mode' );
406
+ $order->save();
407
+ }
408
 
409
  return $this;
410
  }
418
  {
419
  if (!empty($customer_id))
420
  {
421
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
422
+ update_post_meta( $orderId, '_mollie_customer_id', $customer_id );
423
+ } else {
424
+ $order = Mollie_WC_Plugin::getDataHelper()->getWcOrder( $orderId );
425
+ $order->update_meta_data( '_mollie_customer_id', $customer_id );
426
+ $order->save();
427
+ }
428
  }
429
 
430
  return $this;
437
  */
438
  protected function getUserMollieCustomerId($order, $test_mode = false)
439
  {
440
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
441
+ $user_id = $order->customer_user;
442
+ } else {
443
+ $user_id = $order->get_customer_id();
444
+ }
445
+
446
  if (empty($user_id)){
447
  return null;
448
  }
486
  */
487
  public function getOrderMollieCustomerId($order)
488
  {
489
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
490
+ $customerId = get_post_meta( $order->id, '_mollie_customer_id', true );
491
+ } else {
492
+ $customerId = $order->get_meta( '_mollie_customer_id', true );
493
+ }
494
+
495
  return $customerId;
496
  }
497
 
530
  */
531
  public function delete_renewal_meta( $renewal_order )
532
  {
533
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
534
+ delete_post_meta( $renewal_order->id, '_mollie_card_4_digits' );
535
+ delete_post_meta( $renewal_order->id, '_mollie_payment_id' );
536
+ delete_post_meta( $renewal_order->id, '_mollie_payment_mode' );
537
+ delete_post_meta( $renewal_order->id, '_mollie_cancelled_payment_id' );
538
+ } else {
539
+ $renewal_order->delete_meta_data( '_mollie_card_4_digits' );
540
+ $renewal_order->delete_meta_data( '_mollie_payment_id' );
541
+ $renewal_order->delete_meta_data( '_mollie_payment_mode' );
542
+ $renewal_order->delete_meta_data( '_mollie_cancelled_payment_id' );
543
+ $renewal_order->save();
544
+ }
545
+
546
  return $renewal_order;
547
  }
548
 
553
  */
554
  public function add_subscription_payment_meta( $payment_meta, $subscription )
555
  {
556
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
557
+ $payment_meta[ $this->id ] = array (
558
+ 'post_meta' => array (
559
+ '_mollie_payment_id' => array (
560
+ 'value' => get_post_meta( $subscription->id, '_mollie_payment_id', true ),
561
+ 'label' => 'Mollie Payment ID',
562
+ ),
563
+ '_mollie_payment_mode' => array (
564
+ 'value' => get_post_meta( $subscription->id, '_mollie_payment_mode', true ),
565
+ 'label' => 'Mollie Payment Mode',
566
+ ),
567
+ '_mollie_customer_id' => array (
568
+ 'value' => get_post_meta( $subscription->id, '_mollie_customer_id', true ),
569
+ 'label' => 'Mollie Customer ID',
570
+ ),
571
+ ),
572
+ );
573
+ } else {
574
+ $payment_meta[ $this->id ] = array (
575
+ 'post_meta' => array (
576
+ '_mollie_payment_id' => array (
577
+ 'value' => $subscription->get_meta( '_mollie_payment_id', true ),
578
+ 'label' => 'Mollie Payment ID',
579
+ ),
580
+ '_mollie_payment_mode' => array (
581
+ 'value' => $subscription->get_meta( '_mollie_payment_mode', true ),
582
+ 'label' => 'Mollie Payment Mode',
583
+ ),
584
+ '_mollie_customer_id' => array (
585
+ 'value' => $subscription->get_meta( '_mollie_customer_id', true ),
586
+ 'label' => 'Mollie Customer ID',
587
+ ),
588
+ ),
589
+ );
590
+ }
591
  return $payment_meta;
592
  }
593
 
612
  */
613
  public function update_failing_payment_method( $subscription, $renewal_order )
614
  {
615
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
616
+ update_post_meta( $subscription->id, '_mollie_customer_id', $renewal_order->mollie_customer_id );
617
+ update_post_meta( $subscription->id, '_mollie_payment_id', $renewal_order->mollie_payment_id );
618
+ } else {
619
+ $subscription = Mollie_WC_Plugin::getDataHelper()->getWcOrder( $subscription->id );
620
+ $subscription->update_meta_data( '_mollie_customer_id', $renewal_order->mollie_customer_id );
621
+ $subscription->update_meta_data( '_mollie_payment_id', $renewal_order->mollie_payment_id );
622
+ $subscription->save();
623
+ }
624
  }
625
 
626
  /**
includes/mollie/wc/gateway/banktransfer.php CHANGED
@@ -75,10 +75,12 @@ class Mollie_WC_Gateway_BankTransfer extends Mollie_WC_Gateway_Abstract
75
  $args['dueDate'] = $expiry_date;
76
  }
77
 
 
 
78
  // Mail payment instructions
79
- if ($this->get_option('mail_payment_instructions') === 'yes' && !empty($order->billing_email))
80
  {
81
- $args['billingEmail'] = trim($order->billing_email);
82
  }
83
 
84
  return $args;
@@ -201,21 +203,23 @@ class Mollie_WC_Gateway_BankTransfer extends Mollie_WC_Gateway_Abstract
201
  && class_exists('DateTime')
202
  && class_exists('DateInterval'))
203
  {
204
- $expiry_date = DateTime::createFromFormat('U', time());
205
- $expiry_date->add(new DateInterval($payment->expiryPeriod));
 
 
206
 
207
  if ($admin_instructions)
208
  {
209
  $instructions .= "\n" . sprintf(
210
  __('The payment will expire on <strong>%s</strong>.', 'mollie-payments-for-woocommerce'),
211
- $expiry_date->format(wc_date_format())
212
  ) . "\n";
213
  }
214
  else
215
  {
216
  $instructions .= "\n" . sprintf(
217
  __('The payment will expire on <strong>%s</strong>. Please make sure you transfer the total amount before this date.', 'mollie-payments-for-woocommerce'),
218
- $expiry_date->format(wc_date_format())
219
  ) . "\n";
220
  }
221
  }
75
  $args['dueDate'] = $expiry_date;
76
  }
77
 
78
+ $order_billing_email = ( version_compare( WC_VERSION, '3.0', '<' ) ) ? $order->billing_email : $order->get_billing_email();
79
+
80
  // Mail payment instructions
81
+ if ($this->get_option('mail_payment_instructions') === 'yes' && !empty($order_billing_email))
82
  {
83
+ $args['billingEmail'] = trim($order_billing_email);
84
  }
85
 
86
  return $args;
203
  && class_exists('DateTime')
204
  && class_exists('DateInterval'))
205
  {
206
+ $expiry_date = DateTime::createFromFormat( 'U', time() );
207
+ $expiry_date->add( new DateInterval( $payment->expiryPeriod ) );
208
+ $expiry_date = $expiry_date->format( wc_date_format() );
209
+ $expiry_date = date_i18n( wc_date_format(), strtotime( $expiry_date ) );
210
 
211
  if ($admin_instructions)
212
  {
213
  $instructions .= "\n" . sprintf(
214
  __('The payment will expire on <strong>%s</strong>.', 'mollie-payments-for-woocommerce'),
215
+ $expiry_date
216
  ) . "\n";
217
  }
218
  else
219
  {
220
  $instructions .= "\n" . sprintf(
221
  __('The payment will expire on <strong>%s</strong>. Please make sure you transfer the total amount before this date.', 'mollie-payments-for-woocommerce'),
222
+ $expiry_date
223
  ) . "\n";
224
  }
225
  }
includes/mollie/wc/helper/api.php CHANGED
@@ -30,6 +30,10 @@ class Mollie_WC_Helper_Api
30
 
31
  $api_key = $this->settings_helper->getApiKey($test_mode);
32
 
 
 
 
 
33
  if (empty($api_key))
34
  {
35
  throw new Mollie_WC_Exception_InvalidApiKey(__('No API key provided.', 'mollie-payments-for-woocommerce'));
30
 
31
  $api_key = $this->settings_helper->getApiKey($test_mode);
32
 
33
+ if(has_filter('mollie_api_key_filter')) {
34
+ $api_key = apply_filters('mollie_api_key_filter', $api_key);
35
+ }
36
+
37
  if (empty($api_key))
38
  {
39
  throw new Mollie_WC_Exception_InvalidApiKey(__('No API key provided.', 'mollie-payments-for-woocommerce'));
includes/mollie/wc/helper/data.php CHANGED
@@ -53,6 +53,8 @@ class Mollie_WC_Helper_Data
53
  */
54
  protected function getTransientId ($transient)
55
  {
 
 
56
  /*
57
  * WordPress will save two options to wp_options table:
58
  * 1. _transient_<transient_id>
@@ -62,9 +64,19 @@ class Mollie_WC_Helper_Data
62
  $option_name = '_transient_timeout_' . $transient_id;
63
  $option_name_length = strlen($option_name);
64
 
65
- if ($option_name_length > 64)
 
 
 
 
 
 
 
 
 
 
66
  {
67
- trigger_error("Transient id $transient_id is to long. Option name $option_name ($option_name_length) will be to long for database column wp_options.option_name which is varchar(64).", E_USER_WARNING);
68
  }
69
 
70
  return $transient_id;
@@ -174,7 +186,9 @@ class Mollie_WC_Helper_Data
174
  }
175
  }
176
 
177
- return isset($payment_gateways[$order->payment_method]) ? $payment_gateways[$order->payment_method] : false;
 
 
178
  }
179
 
180
  /**
@@ -439,15 +453,30 @@ class Mollie_WC_Helper_Data
439
  */
440
  public function setActiveMolliePayment ($order_id, Mollie_API_Object_Payment $payment)
441
  {
442
- add_post_meta($order_id, '_mollie_payment_id', $payment->id, $single = true);
443
- add_post_meta($order_id, '_mollie_payment_mode', $payment->mode, $single = true);
 
444
 
445
- delete_post_meta($order_id, '_mollie_cancelled_payment_id');
446
 
447
- if ($payment->customerId)
448
- {
449
- add_post_meta($order_id, '_mollie_customer_id', $payment->customerId, $single = true);
450
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
451
 
452
  return $this;
453
  }
@@ -461,7 +490,13 @@ class Mollie_WC_Helper_Data
461
  {
462
  if (!empty($customer_id))
463
  {
464
- update_user_meta($user_id, 'mollie_customer_id', $customer_id);
 
 
 
 
 
 
465
  }
466
 
467
  return $this;
@@ -479,7 +514,12 @@ class Mollie_WC_Helper_Data
479
  return NULL;
480
  }
481
 
482
- $customer_id = get_user_meta($user_id, 'mollie_customer_id', $single = true);
 
 
 
 
 
483
 
484
  if (empty($customer_id))
485
  {
@@ -517,8 +557,15 @@ class Mollie_WC_Helper_Data
517
  */
518
  public function unsetActiveMolliePayment ($order_id)
519
  {
520
- delete_post_meta($order_id, '_mollie_payment_id');
521
- delete_post_meta($order_id, '_mollie_payment_mode');
 
 
 
 
 
 
 
522
 
523
  return $this;
524
  }
@@ -531,7 +578,14 @@ class Mollie_WC_Helper_Data
531
  */
532
  public function getActiveMolliePaymentId ($order_id)
533
  {
534
- return get_post_meta($order_id, '_mollie_payment_id', $single = true);
 
 
 
 
 
 
 
535
  }
536
 
537
  /**
@@ -542,7 +596,14 @@ class Mollie_WC_Helper_Data
542
  */
543
  public function getActiveMolliePaymentMode ($order_id)
544
  {
545
- return get_post_meta($order_id, '_mollie_payment_mode', $single = true);
 
 
 
 
 
 
 
546
  }
547
 
548
  /**
@@ -584,7 +645,13 @@ class Mollie_WC_Helper_Data
584
  */
585
  public function setCancelledMolliePaymentId ($order_id, $payment_id)
586
  {
587
- add_post_meta($order_id, '_mollie_cancelled_payment_id', $payment_id, $single = true);
 
 
 
 
 
 
588
 
589
  return $this;
590
  }
@@ -595,7 +662,14 @@ class Mollie_WC_Helper_Data
595
  */
596
  public function getCancelledMolliePaymentId ($order_id)
597
  {
598
- return get_post_meta($order_id, '_mollie_cancelled_payment_id', $single = true);
 
 
 
 
 
 
 
599
  }
600
 
601
  /**
@@ -620,15 +694,15 @@ class Mollie_WC_Helper_Data
620
  {
621
  if ($item['product_id'] > 0)
622
  {
623
- $product = $order->get_product_from_item($item);
624
 
625
- if ($product && $product->exists() && $product->managing_stock())
626
  {
627
- $old_stock = $product->stock;
628
 
629
  $qty = apply_filters( 'woocommerce_order_item_quantity', $item['qty'], $order, $item);
630
 
631
- $new_quantity = $product->increase_stock( $qty );
632
 
633
  do_action('woocommerce_auto_stock_restored', $product, $item);
634
 
@@ -639,12 +713,19 @@ class Mollie_WC_Helper_Data
639
  $new_quantity
640
  ));
641
 
642
- $order->send_stock_notifications($product, $new_quantity, $item['qty']);
 
 
643
  }
644
  }
645
  }
646
 
647
  // Mark order stock as not-reduced
648
- delete_post_meta($order->id, '_order_stock_reduced');
 
 
 
 
 
649
  }
650
  }
53
  */
54
  protected function getTransientId ($transient)
55
  {
56
+ global $wp_version;
57
+
58
  /*
59
  * WordPress will save two options to wp_options table:
60
  * 1. _transient_<transient_id>
64
  $option_name = '_transient_timeout_' . $transient_id;
65
  $option_name_length = strlen($option_name);
66
 
67
+ $max_option_name_length = 191;
68
+
69
+ /**
70
+ * Prior to WooPress version 4.4.0, the maximum length for wp_options.option_name is 64 characters.
71
+ * @see https://core.trac.wordpress.org/changeset/34030
72
+ */
73
+ if ($wp_version < '4.4.0') {
74
+ $max_option_name_length = 64;
75
+ }
76
+
77
+ if ($option_name_length > $max_option_name_length)
78
  {
79
+ trigger_error("Transient id $transient_id is to long. Option name $option_name ($option_name_length) will be to long for database column wp_options.option_name which is varchar($max_option_name_length).", E_USER_WARNING);
80
  }
81
 
82
  return $transient_id;
186
  }
187
  }
188
 
189
+ $order_payment_method = ( version_compare( WC_VERSION, '3.0', '<' ) ) ? $order->payment_method : $order->get_payment_method();
190
+
191
+ return isset($payment_gateways[$order_payment_method]) ? $payment_gateways[$order_payment_method] : false;
192
  }
193
 
194
  /**
453
  */
454
  public function setActiveMolliePayment ($order_id, Mollie_API_Object_Payment $payment)
455
  {
456
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
457
+ add_post_meta( $order_id, '_mollie_payment_id', $payment->id, $single = true );
458
+ add_post_meta( $order_id, '_mollie_payment_mode', $payment->mode, $single = true );
459
 
460
+ delete_post_meta( $order_id, '_mollie_cancelled_payment_id' );
461
 
462
+ if ( $payment->customerId ) {
463
+ add_post_meta( $order_id, '_mollie_customer_id', $payment->customerId, $single = true );
464
+ }
465
+
466
+ } else {
467
+ $order = Mollie_WC_Plugin::getDataHelper()->getWcOrder( $order_id );
468
+
469
+ $order->update_meta_data( '_mollie_payment_id', $payment->id );
470
+ $order->update_meta_data( '_mollie_payment_mode', $payment->mode );
471
+
472
+ $order->delete_meta_data( '_mollie_cancelled_payment_id' );
473
+
474
+ if ( $payment->customerId ) {
475
+ $order->update_meta_data( '_mollie_customer_id', $payment->customerId );
476
+ }
477
+
478
+ $order->save();
479
+ }
480
 
481
  return $this;
482
  }
490
  {
491
  if (!empty($customer_id))
492
  {
493
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
494
+ update_user_meta( $user_id, 'mollie_customer_id', $customer_id );
495
+ } else {
496
+ $customer = new WC_Customer( $user_id );
497
+ $customer->update_meta_data( 'mollie_customer_id', $customer_id );
498
+ $customer->save();
499
+ }
500
  }
501
 
502
  return $this;
514
  return NULL;
515
  }
516
 
517
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
518
+ $customer_id = get_user_meta( $user_id, 'mollie_customer_id', $single = true );
519
+ } else {
520
+ $customer = new WC_Customer( $user_id );
521
+ $customer_id = $customer->get_meta( 'mollie_customer_id' );
522
+ }
523
 
524
  if (empty($customer_id))
525
  {
557
  */
558
  public function unsetActiveMolliePayment ($order_id)
559
  {
560
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
561
+ delete_post_meta($order_id, '_mollie_payment_id');
562
+ delete_post_meta($order_id, '_mollie_payment_mode');
563
+ } else {
564
+ $order = Mollie_WC_Plugin::getDataHelper()->getWcOrder( $order_id );
565
+ $order->delete_meta_data( '_mollie_payment_id' );
566
+ $order->delete_meta_data( '_mollie_payment_mode' );
567
+ $order->save();
568
+ }
569
 
570
  return $this;
571
  }
578
  */
579
  public function getActiveMolliePaymentId ($order_id)
580
  {
581
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
582
+ $mollie_payment_id = get_post_meta( $order_id, '_mollie_payment_id', $single = true );
583
+ } else {
584
+ $order = Mollie_WC_Plugin::getDataHelper()->getWcOrder( $order_id );
585
+ $mollie_payment_id = $order->get_meta( '_mollie_payment_id', true );
586
+ }
587
+
588
+ return $mollie_payment_id;
589
  }
590
 
591
  /**
596
  */
597
  public function getActiveMolliePaymentMode ($order_id)
598
  {
599
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
600
+ $mollie_payment_mode = get_post_meta( $order_id, '_mollie_payment_mode', $single = true );
601
+ } else {
602
+ $order = Mollie_WC_Plugin::getDataHelper()->getWcOrder( $order_id );
603
+ $mollie_payment_mode = $order->get_meta( '_mollie_payment_mode', true );
604
+ }
605
+
606
+ return $mollie_payment_mode;
607
  }
608
 
609
  /**
645
  */
646
  public function setCancelledMolliePaymentId ($order_id, $payment_id)
647
  {
648
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
649
+ add_post_meta($order_id, '_mollie_cancelled_payment_id', $payment_id, $single = true);
650
+ } else {
651
+ $order = Mollie_WC_Plugin::getDataHelper()->getWcOrder( $order_id );
652
+ $order->update_meta_data( '_mollie_cancelled_payment_id', $payment_id );
653
+ $order->save();
654
+ }
655
 
656
  return $this;
657
  }
662
  */
663
  public function getCancelledMolliePaymentId ($order_id)
664
  {
665
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
666
+ $mollie_cancelled_payment_id = get_post_meta( $order_id, '_mollie_cancelled_payment_id', $single = true );
667
+ } else {
668
+ $order = Mollie_WC_Plugin::getDataHelper()->getWcOrder( $order_id );
669
+ $mollie_cancelled_payment_id = $order->get_meta( '_mollie_cancelled_payment_id', true );
670
+ }
671
+
672
+ return $mollie_cancelled_payment_id;
673
  }
674
 
675
  /**
694
  {
695
  if ($item['product_id'] > 0)
696
  {
697
+ $product = ( version_compare( WC_VERSION, '3.0', '<' ) ) ? $order->get_product_from_item($item) : $item->get_product();
698
 
699
+ if ($product && $product->exists() && $product->managing_stock())
700
  {
701
+ $old_stock = ( version_compare( WC_VERSION, '3.0', '<' ) ) ? $product->stock : $product->get_stock_quantity();
702
 
703
  $qty = apply_filters( 'woocommerce_order_item_quantity', $item['qty'], $order, $item);
704
 
705
+ $new_quantity = ( version_compare( WC_VERSION, '3.0', '<' ) ) ? $product->increase_stock( $qty ) : wc_update_product_stock( $product, $qty, 'increase');
706
 
707
  do_action('woocommerce_auto_stock_restored', $product, $item);
708
 
713
  $new_quantity
714
  ));
715
 
716
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
717
+ $order->send_stock_notifications( $product, $new_quantity, $item['qty'] );
718
+ }
719
  }
720
  }
721
  }
722
 
723
  // Mark order stock as not-reduced
724
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
725
+ delete_post_meta($order->id, '_order_stock_reduced');
726
+ } else {
727
+ $order->delete_meta_data( '_order_stock_reduced' );
728
+ $order->save();
729
+ }
730
  }
731
  }
includes/mollie/wc/helper/settings.php CHANGED
@@ -420,12 +420,24 @@ class Mollie_WC_Helper_Settings
420
  */
421
  protected function getSettingId ($setting)
422
  {
 
 
423
  $setting_id = Mollie_WC_Plugin::PLUGIN_ID . '_' . trim($setting);
424
  $setting_id_length = strlen($setting_id);
425
 
426
- if ($setting_id_length > 64)
 
 
 
 
 
 
 
 
 
 
427
  {
428
- trigger_error("Setting id $setting_id ($setting_id_length) to long for database column wp_options.option_name which is varchar(64).", E_USER_WARNING);
429
  }
430
 
431
  return $setting_id;
420
  */
421
  protected function getSettingId ($setting)
422
  {
423
+ global $wp_version;
424
+
425
  $setting_id = Mollie_WC_Plugin::PLUGIN_ID . '_' . trim($setting);
426
  $setting_id_length = strlen($setting_id);
427
 
428
+ $max_option_name_length = 191;
429
+
430
+ /**
431
+ * Prior to WooPress version 4.4.0, the maximum length for wp_options.option_name is 64 characters.
432
+ * @see https://core.trac.wordpress.org/changeset/34030
433
+ */
434
+ if ($wp_version < '4.4.0') {
435
+ $max_option_name_length = 64;
436
+ }
437
+
438
+ if ($setting_id_length > $max_option_name_length)
439
  {
440
+ trigger_error("Setting id $setting_id ($setting_id_length) to long for database column wp_options.option_name which is varchar($max_option_name_length).", E_USER_WARNING);
441
  }
442
 
443
  return $setting_id;
includes/mollie/wc/plugin.php CHANGED
@@ -1,12 +1,13 @@
1
  <?php
2
  // Require WooCommerce fallback functions
3
  require_once dirname(dirname(dirname(__FILE__))) . '/woocommerce_functions.php';
 
4
 
5
  class Mollie_WC_Plugin
6
  {
7
  const PLUGIN_ID = 'mollie-payments-for-woocommerce';
8
  const PLUGIN_TITLE = 'Mollie Payments for WooCommerce';
9
- const PLUGIN_VERSION = '2.5.4';
10
 
11
  const DB_VERSION = '1.0';
12
  const DB_VERSION_PARAM_NAME = 'mollie-db-version';
@@ -67,13 +68,20 @@ class Mollie_WC_Plugin
67
  $pendingPaymentConfirmTable = $wpdb->prefix . self::PENDING_PAYMENT_DB_TABLE_NAME;
68
  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
69
  if($wpdb->get_var("show tables like '$pendingPaymentConfirmTable'") != $pendingPaymentConfirmTable) {
70
- $sql = "CREATE TABLE " . $pendingPaymentConfirmTable . " (
71
- `id` int(11) NOT NULL AUTO_INCREMENT,
72
- `post_id` bigint NOT NULL,
73
- `expired_time` int NOT NULL,
 
74
  UNIQUE KEY id (id)
75
  );";
76
  dbDelta($sql);
 
 
 
 
 
 
77
  }
78
  update_option(self::DB_VERSION_PARAM_NAME, self::DB_VERSION);
79
  }
@@ -89,13 +97,17 @@ class Mollie_WC_Plugin
89
  $currentDate = new DateTime();
90
  $items = $wpdb->get_results("SELECT * FROM {$wpdb->mollie_pending_payment} WHERE expired_time < {$currentDate->getTimestamp()};");
91
  foreach ($items as $item){
92
- $order = wc_get_order( $item->post_id );
93
  if ($order->get_status() == Mollie_WC_Gateway_Abstract::STATUS_COMPLETED){
94
 
95
  $new_order_status = Mollie_WC_Gateway_Abstract::STATUS_FAILED;
96
- $paymentMethodId = get_post_meta( $order->id, '_payment_method_title', true );
97
- $molliePaymentId = get_post_meta( $order->id, '_mollie_payment_id', true );
98
-
 
 
 
 
99
  $order->add_order_note(sprintf(
100
  /* translators: Placeholder 1: payment method title, placeholder 2: payment ID */
101
  __('%s payment failed (%s).', 'mollie-payments-for-woocommerce'),
@@ -104,19 +116,35 @@ class Mollie_WC_Plugin
104
 
105
  $order->update_status($new_order_status, '');
106
 
107
- if (get_post_meta($order->id, '_order_stock_reduced', $single = true)) {
108
- // Restore order stock
109
- Mollie_WC_Plugin::getDataHelper()->restoreOrderStock($order);
110
-
111
- Mollie_WC_Plugin::debug(__METHOD__ . " Stock for order {$order->id} restored.");
112
- }
113
-
114
- $wpdb->delete(
115
- $wpdb->mollie_pending_payment,
116
- array(
117
- 'post_id' => $order->id,
118
- )
119
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
  }
121
  }
122
 
@@ -317,7 +345,7 @@ class Mollie_WC_Plugin
317
  // Convert message to string
318
  if (!is_string($message))
319
  {
320
- $message = print_r($message, true);
321
  }
322
 
323
  // Set debug header
@@ -326,19 +354,31 @@ class Mollie_WC_Plugin
326
  header("X-Mollie-Debug: $message");
327
  }
328
 
329
- // Log message
330
- if (self::getSettingsHelper()->isDebugEnabled())
331
- {
332
- static $logger;
333
 
334
- if (empty($logger))
335
- {
336
- // TODO: Use error_log() fallback if Wc_Logger is not available
337
- $logger = new WC_Logger();
338
- }
339
 
340
- $logger->add(self::PLUGIN_ID . '-' . date('Y-m-d'), $message);
341
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
342
  }
343
 
344
  /**
@@ -359,7 +399,7 @@ class Mollie_WC_Plugin
359
  */
360
  public static function getPluginUrl ($path = '')
361
  {
362
- return untrailingslashit(plugins_url($path, self::getPluginFile()));
363
  }
364
 
365
  /**
1
  <?php
2
  // Require WooCommerce fallback functions
3
  require_once dirname(dirname(dirname(__FILE__))) . '/woocommerce_functions.php';
4
+ require_once dirname(dirname(dirname(__FILE__))) . '/subscriptions_status_check_functions.php';
5
 
6
  class Mollie_WC_Plugin
7
  {
8
  const PLUGIN_ID = 'mollie-payments-for-woocommerce';
9
  const PLUGIN_TITLE = 'Mollie Payments for WooCommerce';
10
+ const PLUGIN_VERSION = '2.6.0';
11
 
12
  const DB_VERSION = '1.0';
13
  const DB_VERSION_PARAM_NAME = 'mollie-db-version';
68
  $pendingPaymentConfirmTable = $wpdb->prefix . self::PENDING_PAYMENT_DB_TABLE_NAME;
69
  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
70
  if($wpdb->get_var("show tables like '$pendingPaymentConfirmTable'") != $pendingPaymentConfirmTable) {
71
+ $sql = "
72
+ CREATE TABLE " . $pendingPaymentConfirmTable . " (
73
+ id int(11) NOT NULL AUTO_INCREMENT,
74
+ post_id bigint NOT NULL,
75
+ expired_time int NOT NULL,
76
  UNIQUE KEY id (id)
77
  );";
78
  dbDelta($sql);
79
+
80
+ /**
81
+ * Remove redundant 'DESCRIBE *__mollie_pending_payment' error so it doesn't show up in error logs
82
+ */
83
+ global $EZSQL_ERROR;
84
+ array_pop($EZSQL_ERROR);
85
  }
86
  update_option(self::DB_VERSION_PARAM_NAME, self::DB_VERSION);
87
  }
97
  $currentDate = new DateTime();
98
  $items = $wpdb->get_results("SELECT * FROM {$wpdb->mollie_pending_payment} WHERE expired_time < {$currentDate->getTimestamp()};");
99
  foreach ($items as $item){
100
+ $order = Mollie_WC_Plugin::getDataHelper()->getWcOrder( $item->post_id );
101
  if ($order->get_status() == Mollie_WC_Gateway_Abstract::STATUS_COMPLETED){
102
 
103
  $new_order_status = Mollie_WC_Gateway_Abstract::STATUS_FAILED;
104
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
105
+ $paymentMethodId = get_post_meta( $order->id, '_payment_method_title', true );
106
+ $molliePaymentId = get_post_meta( $order->id, '_mollie_payment_id', true );
107
+ } else {
108
+ $paymentMethodId = $order->get_meta( '_payment_method_title', true );
109
+ $molliePaymentId = $order->get_meta( '_mollie_payment_id', true );
110
+ }
111
  $order->add_order_note(sprintf(
112
  /* translators: Placeholder 1: payment method title, placeholder 2: payment ID */
113
  __('%s payment failed (%s).', 'mollie-payments-for-woocommerce'),
116
 
117
  $order->update_status($new_order_status, '');
118
 
119
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
120
+ if ( get_post_meta( $order->id, '_order_stock_reduced', $single = true ) ) {
121
+ // Restore order stock
122
+ Mollie_WC_Plugin::getDataHelper()->restoreOrderStock( $order );
123
+
124
+ Mollie_WC_Plugin::debug( __METHOD__ . " Stock for order {$order->id} restored." );
125
+ }
126
+
127
+ $wpdb->delete(
128
+ $wpdb->mollie_pending_payment,
129
+ array(
130
+ 'post_id' => $order->id,
131
+ )
132
+ );
133
+ } else {
134
+ if ( $order->get_meta( '_order_stock_reduced', $single = true ) ) {
135
+ // Restore order stock
136
+ Mollie_WC_Plugin::getDataHelper()->restoreOrderStock( $order );
137
+
138
+ Mollie_WC_Plugin::debug( __METHOD__ . " Stock for order {$order->get_id()} restored." );
139
+ }
140
+
141
+ $wpdb->delete(
142
+ $wpdb->mollie_pending_payment,
143
+ array(
144
+ 'post_id' => $order->get_id(),
145
+ )
146
+ );
147
+ }
148
  }
149
  }
150
 
345
  // Convert message to string
346
  if (!is_string($message))
347
  {
348
+ $message = ( version_compare( WC_VERSION, '3.0', '<' ) ) ? print_r($message, true) : wc_print_r($message, true);
349
  }
350
 
351
  // Set debug header
354
  header("X-Mollie-Debug: $message");
355
  }
356
 
357
+ // Log message
358
+ if ( self::getSettingsHelper()->isDebugEnabled() ) {
 
 
359
 
360
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
 
 
 
 
361
 
362
+ static $logger;
363
+
364
+ if ( empty( $logger ) ) {
365
+ // TODO: Use error_log() fallback if Wc_Logger is not available
366
+ $logger = new WC_Logger();
367
+ }
368
+
369
+ $logger->add( self::PLUGIN_ID . '-' . date( 'Y-m-d' ), $message );
370
+
371
+ } else {
372
+
373
+ $logger = wc_get_logger();
374
+
375
+ $context = array ( 'source' => self::PLUGIN_ID . '-' . date( 'Y-m-d' ) );
376
+
377
+ $logger->debug( $message, $context );
378
+
379
+ }
380
+
381
+ }
382
  }
383
 
384
  /**
399
  */
400
  public static function getPluginUrl ($path = '')
401
  {
402
+ return M4W_PLUGIN_URL . $path;
403
  }
404
 
405
  /**
includes/subscriptions_status_check_functions.php ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class WC_Tools_Subscriptions_Status_Button {
4
+
5
+ /**
6
+ * __construct function.
7
+ *
8
+ * @access public
9
+ */
10
+ function __construct() {
11
+
12
+ add_filter( 'woocommerce_debug_tools', array ( $this, 'mollie_subscription_status_check_button' ) );
13
+ }
14
+
15
+ /**
16
+ * debug_button function.
17
+ *
18
+ * @access public
19
+ *
20
+ * @param mixed $old
21
+ *
22
+ * @return array
23
+ */
24
+ function mollie_subscription_status_check_button( $old ) {
25
+
26
+ $description = __( 'Checks for subscriptions that are incorrectly set to \'Manual renewal\'. First read the ', 'mollie-payments-for-woocommerce' );
27
+ $description .= '<a href=\'https://github.com/mollie/WooCommerce/wiki/Mollie-Subscriptions-Status\'>instructions</a>.';
28
+
29
+ $new = array (
30
+ 'mollie_subscription_status_check_action' => array (
31
+ 'name' => __( 'Mollie Subscriptions Status', 'mollie-payments-for-woocommerce' ),
32
+ 'button' => __( 'Check subscriptions status', 'mollie-payments-for-woocommerce' ),
33
+ 'desc' => $description,
34
+ 'callback' => array ( $this, 'mollie_subscription_status_check_action' ),
35
+ ),
36
+ );
37
+ $tools = array_merge( $old, $new );
38
+
39
+ return $tools;
40
+ }
41
+
42
+ /**
43
+ * debug_button_action function.
44
+ *
45
+ * @access public
46
+ * @return void
47
+ */
48
+ function mollie_subscription_status_check_action() {
49
+
50
+ // Get the next 10 subscriptions
51
+ // Offset will be set if the tool was used in last 24 hours, to only get 'next' subscriptions
52
+ $offset = get_transient( 'mollie_subscription_status_offset' );
53
+ $subscriptions = wcs_get_subscriptions( array ( 'subscriptions_per_page' => '10', 'offset' => $offset ) );
54
+
55
+ // Define a var that registers all updated subscriptions
56
+ $updated_subscriptions = '';
57
+
58
+ // Loop through all subscriptions
59
+ foreach ( $subscriptions as $subscription ) {
60
+
61
+ // Get all data in the correct way for WooCommerce 3.x or lower
62
+ if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
63
+ $subscription_is_manual = get_post_meta( $subscription->id, '_requires_manual_renewal', true );
64
+ $subscription_status = $subscription->status;
65
+
66
+ $mollie_customer_id = get_post_meta( $subscription->id, '_mollie_customer_id', true );
67
+ $subscription_id = $subscription->id;
68
+ } else {
69
+ $subscription = new WC_Subscription( $subscription->ID );
70
+
71
+ $subscription_is_manual = $subscription->is_manual();
72
+ $subscription_status = $subscription->get_status();
73
+
74
+ $mollie_customer_id = $subscription->get_meta( '_mollie_customer_id' );
75
+ $subscription_id = $subscription->get_id();
76
+ }
77
+
78
+ // Only continue if the subscription is set to require manual renewal and status is On-Hold
79
+ if ( ( $subscription_is_manual ) && ( $subscription_status == 'on-hold' ) ) {
80
+
81
+ // Skip to next subscription if no Mollie Customer ID is found (nothing we can do...)
82
+ if ( empty( $mollie_customer_id ) ) {
83
+ continue;
84
+ }
85
+
86
+ // Is test mode enabled?
87
+ $settings_helper = Mollie_WC_Plugin::getSettingsHelper();
88
+ $test_mode = $settings_helper->isTestModeEnabled();
89
+
90
+ // Get all mandates for this Mollie customer ID
91
+ $mandates = Mollie_WC_Plugin::getApiHelper()->getApiClient( $test_mode )->customers_mandates->withParentId( $mollie_customer_id )->all();
92
+
93
+ // Find one valid mandate for direct debit or credit card
94
+ // Prefer using a direct debit mandate because transaction costs are lower
95
+ $validMandate = false;
96
+ $method = '';
97
+
98
+ foreach ( $mandates as $mandate ) {
99
+ $method = $mandate->method;
100
+
101
+ if ( $mandate->status == 'valid' && $mandate->method == 'directdebit' ) {
102
+ $validMandate = true;
103
+ break;
104
+ }
105
+
106
+ if ( $mandate->status == 'valid' && $mandate->method == 'creditcard' ) {
107
+ $validMandate = true;
108
+ break;
109
+ }
110
+ }
111
+
112
+ // If a valid mandate is found, update the subscription to Automatic Renewal
113
+ if ( $validMandate ) {
114
+
115
+ update_post_meta( $subscription_id, '_requires_manual_renewal', 'false' );
116
+
117
+ if ( $method == 'directdebit' ) {
118
+ update_post_meta( $subscription_id, '_payment_method', 'mollie_wc_gateway_ideal' );
119
+ update_post_meta( $subscription_id, '_payment_method_title', 'iDEAL' );
120
+ }
121
+
122
+ if ( $method == 'creditcard' ) {
123
+ update_post_meta( $subscription_id, '_payment_method', 'mollie_wc_gateway_creditcard' );
124
+ update_post_meta( $subscription_id, '_payment_method_title', 'Credit Card' );
125
+ }
126
+
127
+ $subscription->update_status( 'active',
128
+ __( 'Subscription updated to Automated renewal via Mollie, status set to Active. Processed by \'Mollie Subscriptions Status\' tool.', 'mollie-payments-for-woocommerce' ),
129
+ true
130
+ );
131
+
132
+ $updated_subscriptions[] = $subscription_id;
133
+
134
+ } else {
135
+
136
+ $subscription->add_order_note(
137
+ __( 'Subscription not updated because there was no valid mandate at Mollie. Processed by \'Mollie Subscriptions Status\' tool.', 'mollie-payments-for-woocommerce' )
138
+ );
139
+
140
+ }
141
+
142
+ }
143
+
144
+ // Update the offset to only process the next subscriptions
145
+ $offset = get_transient( 'mollie_subscription_status_offset' );
146
+ set_transient( 'mollie_subscription_status_offset', $offset + 1, DAY_IN_SECONDS );
147
+
148
+ }
149
+
150
+ // Output (and log) a message about which (if any) subscriptions got updated
151
+ if ( ! empty( $updated_subscriptions ) ) {
152
+ echo '<div class="updated"><p>';
153
+ echo 'The following subscriptions have been updated ' . implode( ', ', $updated_subscriptions ) . '. Manually check them as described in the ';
154
+ echo '<a href=\'https://github.com/mollie/WooCommerce/wiki/Mollie-Subscriptions-Status\'>instructions</a>.';
155
+ echo '</p></div>';
156
+
157
+ Mollie_WC_Plugin::debug( 'Subscriptions updated by \'Check Mollie Subscriptions Status\': ' . implode( ', ', $updated_subscriptions ) . '. See https://github.com/mollie/WooCommerce/wiki/Mollie-Subscriptions-Status' );
158
+
159
+ } else {
160
+ echo '<div class="updated"><p>';
161
+ echo __( 'No subscriptions updated in this batch.', 'mollie-payments-for-woocommerce' );
162
+ echo '</p></div>';
163
+ }
164
+
165
+ // Get current offset and check if there are any subscriptions left
166
+ $current_offset = get_transient( 'mollie_subscription_status_offset' );
167
+ $subscriptions_left = wcs_get_subscriptions( array (
168
+ 'subscriptions_per_page' => '10',
169
+ 'offset' => $current_offset
170
+ ) );
171
+
172
+ // Explain what to do if there are or are not subscriptions left
173
+ if ( empty( $subscriptions_left ) ) {
174
+ echo '<div class="updated notice"><p>' . __( 'No more subscriptions left to process!', 'mollie-payments-for-woocommerce' ) . '</p></div>';
175
+ } else {
176
+ echo '<div class="error notice"><p>' . __( 'There are still subscriptions left, use the tool again!', 'mollie-payments-for-woocommerce' ) . '</p></div>';
177
+ }
178
+
179
+ }
180
+
181
+ }
182
+
183
+ $GLOBALS['WC_Tools_Subscriptions_Status_Button'] = new WC_Tools_Subscriptions_Status_Button();
mollie-payments-for-woocommerce.php CHANGED
@@ -3,11 +3,11 @@
3
  * Plugin Name: Mollie Payments for WooCommerce
4
  * Plugin URI: https://github.com/mollie/WooCommerce
5
  * Description: Accept payments in WooCommerce with the official Mollie plugin
6
- * Version: 2.5.4
7
  * Author: Mollie
8
  * Author URI: https://www.mollie.com
9
  * Requires at least: 3.8
10
- * Tested up to: 4.7.3
11
  * Text Domain: mollie-payments-for-woocommerce
12
  * Domain Path: /i18n/languages/
13
  * License: GPLv2 or later
@@ -16,6 +16,18 @@ require_once 'includes/mollie/wc/autoload.php';
16
 
17
  load_plugin_textdomain('mollie-payments-for-woocommerce', false, 'mollie-payments-for-woocommerce/i18n/languages');
18
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  /**
20
  * Called when plugin is loaded
21
  */
3
  * Plugin Name: Mollie Payments for WooCommerce
4
  * Plugin URI: https://github.com/mollie/WooCommerce
5
  * Description: Accept payments in WooCommerce with the official Mollie plugin
6
+ * Version: 2.6.0
7
  * Author: Mollie
8
  * Author URI: https://www.mollie.com
9
  * Requires at least: 3.8
10
+ * Tested up to: 4.8
11
  * Text Domain: mollie-payments-for-woocommerce
12
  * Domain Path: /i18n/languages/
13
  * License: GPLv2 or later
16
 
17
  load_plugin_textdomain('mollie-payments-for-woocommerce', false, 'mollie-payments-for-woocommerce/i18n/languages');
18
 
19
+ // TODO: Add more constants WP-style, and move from classes to here.
20
+
21
+ // Plugin folder URL.
22
+ if ( ! defined( 'M4W_PLUGIN_URL' ) ) {
23
+ define( 'M4W_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
24
+ }
25
+
26
+ // Plugin directory
27
+ if ( ! defined( 'M4W_PLUGIN_DIR' ) ) {
28
+ define( 'M4W_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
29
+ }
30
+
31
  /**
32
  * Called when plugin is loaded
33
  */
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Mollie Payments for WooCommerce ===
2
- Contributors: l.vangunst, daanvm, ndijkstra, robin-mollie
3
  Tags: mollie, payments, woocommerce, e-commerce, webshop, psp, ideal, sofort, credit card, creditcard, visa, mastercard, mistercash, bancontact, bitcoin, paysafecard, direct debit, incasso, sepa, banktransfer, overboeking, betalingen, recurring, subscriptions
4
  Requires at least: 3.8
5
- Tested up to: 4.7.3
6
- Stable tag: 2.5.4
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -113,11 +113,25 @@ Automatic updates should work like a charm; as always though, ensure you backup
113
 
114
  == Changelog ==
115
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  = 2.5.4 - 07/03/2017 =
117
  * Added an option to disable storing the customer details at Mollie
118
 
119
  = 2.5.3 - 01/03/2017 =
120
- * Bugfix for crashing Wordpress when using PHP version 5.3 or lower
121
 
122
  = 2.5.2 - 28/02/2017 =
123
  * The plugin is now compatible with WooCommerce Subscriptions for recurring payments
1
  === Mollie Payments for WooCommerce ===
2
+ Contributors: daanvm, davdebcom, l.vangunst, ndijkstra, robin-mollie
3
  Tags: mollie, payments, woocommerce, e-commerce, webshop, psp, ideal, sofort, credit card, creditcard, visa, mastercard, mistercash, bancontact, bitcoin, paysafecard, direct debit, incasso, sepa, banktransfer, overboeking, betalingen, recurring, subscriptions
4
  Requires at least: 3.8
5
+ Tested up to: 4.8
6
+ Stable tag: 2.6.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
113
 
114
  == Changelog ==
115
 
116
+ = 2.6.0 - 07/06/2017 =
117
+ * Add support for WooCommerce 3.0 (backwards compatible with older versions of WooCommerce)
118
+ * The expiry date that's shown for payments via Bank transfer is now in the correct (translated) format
119
+ * Fix redundant "DESCRIBE *__mollie_pending_payment" error (on new installs)
120
+ * WooCommerce Subscriptions:
121
+ * Important: added Subscription Status tool to fix broken subscriptions, see [instructions](https://github.com/mollie/WooCommerce/wiki/Mollie-Subscriptions-Status)
122
+ * SEPA recurring payments, take initial order status from settings, default On-Hold (instead of Completed)
123
+ * Fix issue where valid subscriptions are set to 'on-hold' and 'manual renewal' only 15 days after renewal payment is created (now only do that after 21 days)
124
+ * Improve "Subscription switching" support to also allow amount changes
125
+ * Fix typo in recurring payment order notes
126
+
127
+ = 2.5.5 - 31/03/2017 =
128
+ * Allow the option name to have maximum 191 characters for newer WooPress installations.
129
+
130
  = 2.5.4 - 07/03/2017 =
131
  * Added an option to disable storing the customer details at Mollie
132
 
133
  = 2.5.3 - 01/03/2017 =
134
+ * Bugfix for crashing WooPress when using PHP version 5.3 or lower
135
 
136
  = 2.5.2 - 28/02/2017 =
137
  * The plugin is now compatible with WooCommerce Subscriptions for recurring payments