-
Notifications
You must be signed in to change notification settings - Fork 0
/
braintree.go
3993 lines (3991 loc) · 276 KB
/
braintree.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package connector_errors
import "github.com/chargehive/proto/golang/chargehive/chtype"
func(){
switch code {
case api.RCode403:
setFailoverMerchantMessage(detail, "Unauthorized")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CONFIGURATION
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode1000:
setFailoverMerchantMessage(detail, "Approved")
detail.FailureType = chtype.FAILURE_TYPE_NONE
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_NONE
case api.RCode1001:
setFailoverMerchantMessage(detail, "Approved, check customer ID")
detail.FailureType = chtype.FAILURE_TYPE_NONE
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_NONE
case api.RCode1002:
setFailoverMerchantMessage(detail, "Processed - This code will be assigned to all refunds, credits, and voice authorizations. These types of transactions do not need to be authorized; they are immediately submitted for settlement.")
detail.FailureType = chtype.FAILURE_TYPE_NONE
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_NONE
case api.RCode1003:
setFailoverMerchantMessage(detail, "Approved with Risk - The bank account can be used for transactions, but some risk has been identified (e.g. some customer information does not exactly match the bank's records).")
detail.FailureType = chtype.FAILURE_TYPE_NONE
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_NONE
case api.RCode2000:
setFailoverMerchantMessage(detail, "Do Not Honor - The customer's bank is unwilling to accept the transaction. The customer will need to contact their bank for more details regarding this generic decline.")
detail.FailureType = chtype.FAILURE_TYPE_SOFT
detail.Category = chtype.RESPONSE_CATEGORY_UNKNOWN
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2001:
setFailoverMerchantMessage(detail, "Insufficient Funds - The account did not have sufficient funds to cover the transaction amount at the time of the transaction – subsequent attempts at a later date may be successful.")
detail.FailureType = chtype.FAILURE_TYPE_SOFT
detail.Category = chtype.RESPONSE_CATEGORY_CHARGE
detail.ErrorType = chtype.RESPONSE_ERROR_AVAILABLE_FUNDS
case api.RCode2002:
setFailoverMerchantMessage(detail, "Limit Exceeded - The attempted transaction exceeds the withdrawal limit of the account. The customer will need to contact their bank to change the account limits or use a different payment method.")
detail.FailureType = chtype.FAILURE_TYPE_SOFT
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_LIMIT
case api.RCode2003:
setFailoverMerchantMessage(detail, "Cardholder's Activity Limit Exceeded - The attempted transaction exceeds the activity limit of the account. The customer will need to contact their bank to change the account limits or use a different payment method.")
detail.FailureType = chtype.FAILURE_TYPE_SOFT
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_LIMIT
case api.RCode2004:
setFailoverMerchantMessage(detail, "Expired Card - Card is expired. The customer will need to use a different payment method.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_EXPIRED
case api.RCode2005:
setFailoverMerchantMessage(detail, "Invalid Credit Card Number - The customer entered an invalid payment method or made a typo in their credit card information. Have the customer correct their payment information and attempt the transaction again – if the decline persists, they will need to contact their bank.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_USER_INPUT
case api.RCode2006:
setFailoverMerchantMessage(detail, "Invalid Expiration Date - The customer entered an invalid payment method or made a typo in their card expiration date. Have the customer correct their payment information and attempt the transaction again – if the decline persists, they will need to contact their bank.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_USER_INPUT
case api.RCode2007:
setFailoverMerchantMessage(detail, "No Account - The submitted card number is not on file with the card-issuing bank. The customer will need to contact their bank.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_UNAVAILABLE
case api.RCode2008:
setFailoverMerchantMessage(detail, "Card Account Length Error - The submitted card number does not include the proper number of digits. Have the customer attempt the transaction again – if the decline persists, the customer will need to contact their bank.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_USER_INPUT
case api.RCode2009:
setFailoverMerchantMessage(detail, "No Such Issuer - This decline code could indicate that the submitted card number does not correlate to an existing card-issuing bank or that there is a connectivity error with the issuer. The customer will need to contact their bank for more information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CONNECTIVITY
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2010:
setFailoverMerchantMessage(detail, "Card Issuer Declined CVV - The customer entered in an invalid security code or made a typo in their card information. Have the customer attempt the transaction again – if the decline persists, the customer will need to contact their bank.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_VERIFICATION
detail.ErrorType = chtype.RESPONSE_ERROR_CVV
case api.RCode2011:
setFailoverMerchantMessage(detail, "Voice Authorization Required - The customer’s bank is requesting that the merchant (you) call to obtain a special authorization code in order to complete this transaction. This can result in a lengthy process – we recommend obtaining a new payment method instead. Contact us for more details.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_VERIFICATION
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2012:
setFailoverMerchantMessage(detail, "Processor Declined – Possible Lost Card - The card used has likely been reported as lost. The customer will need to contact their bank for more information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_LOST
case api.RCode2013:
setFailoverMerchantMessage(detail, "Processor Declined – Possible Stolen Card - The card used has likely been reported as stolen. The customer will need to contact their bank for more information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_LOST
case api.RCode2014:
setFailoverMerchantMessage(detail, "Processor Declined – Fraud Suspected - The customer’s bank suspects fraud – they will need to contact their bank for more information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_FRAUD
detail.ErrorType = chtype.RESPONSE_ERROR_FRAUD
case api.RCode2015:
setFailoverMerchantMessage(detail, "Transaction Not Allowed - The customer's bank is declining the transaction for unspecified reasons, possibly due to an issue with the card itself. They will need to contact their bank or use a different payment method.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_UNKNOWN
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2016:
setFailoverMerchantMessage(detail, "Duplicate Transaction - The submitted transaction appears to be a duplicate of a previously submitted transaction and was declined to prevent charging the same card twice for the same service.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_UNKNOWN
detail.ErrorType = chtype.RESPONSE_ERROR_DUPLICATE
case api.RCode2017:
setFailoverMerchantMessage(detail, "Cardholder Stopped Billing - The customer requested a cancellation of a single transaction – reach out to them for more information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_UNKNOWN
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2018:
setFailoverMerchantMessage(detail, "Cardholder Stopped All Billing - The customer requested the cancellation of a recurring transaction or subscription – reach out to them for more information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_UNKNOWN
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2019:
setFailoverMerchantMessage(detail, "Invalid Transaction - The customer’s bank declined the transaction, typically because the card in question does not support this type of transaction – for example, the customer used an FSA debit card for a non-healthcare related purchase. They will need to contact their bank for more information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode2020:
setFailoverMerchantMessage(detail, "Violation - The customer will need to contact their bank for more information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_UNKNOWN
detail.ErrorType = chtype.RESPONSE_ERROR_UNKNOWN
case api.RCode2021:
setFailoverMerchantMessage(detail, "Security Violation - The customer's bank is declining the transaction, possibly due to a fraud concern. They will need to contact their bank or use a different payment method.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_FRAUD
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2022:
setFailoverMerchantMessage(detail, "Declined – Updated Cardholder Available - The submitted card has expired or been reported lost and a new card has been issued. Reach out to your customer to obtain updated card information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_EXPIRED
case api.RCode2023:
setFailoverMerchantMessage(detail, "Processor Does Not Support This Feature - Your account can't process transactions with the intended feature – for example, 3D Secure or Level 2/Level 3 data. If you believe your merchant account should be set up to accept this type of transaction, contact us.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode2024:
setFailoverMerchantMessage(detail, "Card Type Not Enabled - Your account can't process the attempted card type. If you believe your merchant account should be set up to accept this type of card, contact us for assistance.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CONFIGURATION
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode2025:
setFailoverMerchantMessage(detail, "Set Up Error – Merchant - Depending on your region, this response could indicate a connectivity or setup issue. Contact us for more information regarding this error message.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CONFIGURATION
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode2026:
setFailoverMerchantMessage(detail, "Invalid Merchant ID - The customer’s bank declined the transaction, typically because the card in question does not support this type of transaction. If this response persists across transactions for multiple customers, it could indicate a connectivity or setup issue. Contact us for more information regarding this error message.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CONFIGURATION
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2027:
setFailoverMerchantMessage(detail, "Set Up Error – Amount - This rare decline code indicates an issue with processing the amount of the transaction. The customer will need to contact their bank for more details.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_UNKNOWN
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode2028:
setFailoverMerchantMessage(detail, "Set Up Error – Hierarchy - There is a setup issue with your account. Contact us for more information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CONFIGURATION
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2029:
setFailoverMerchantMessage(detail, "Set Up Error – Card - This response generally indicates that there is a problem with the submitted card. The customer will need to use a different payment method.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2030:
setFailoverMerchantMessage(detail, "Set Up Error – Terminal - There is a setup issue with your account. Contact us for more information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CONFIGURATION
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2031:
setFailoverMerchantMessage(detail, "Encryption Error - The cardholder’s bank does not support $0.00 card verifications. Enable the Retry All Failed $0option to resolve this error. Contact us with questions.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CONFIGURATION
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2032:
setFailoverMerchantMessage(detail, "Surcharge Not Permitted - Surcharge amount not permitted on this card. The customer will need to use a different payment method.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode2033:
setFailoverMerchantMessage(detail, "Inconsistent Data - An error occurred when communicating with the processor. The customer will need to contact their bank for more details.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CONNECTIVITY
detail.ErrorType = chtype.RESPONSE_ERROR_UNAVAILABLE
case api.RCode2034:
setFailoverMerchantMessage(detail, "No Action Taken - An error occurred and the intended transaction was not completed. Attempt the transaction again.")
detail.FailureType = chtype.FAILURE_TYPE_SOFT
detail.Category = chtype.RESPONSE_CATEGORY_UNKNOWN
detail.ErrorType = chtype.RESPONSE_ERROR_UNKNOWN
case api.RCode2035:
setFailoverMerchantMessage(detail, "Partial Approval For Amount In Group III Version - The customer's bank approved the transaction for less than the requested amount. Have the customer attempt the transaction again – if the decline persists, the customer will need to use a different payment method.")
detail.FailureType = chtype.FAILURE_TYPE_SOFT
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_UNKNOWN
case api.RCode2036:
setFailoverMerchantMessage(detail, "Authorization could not be found - An error occurred when trying to process the authorization. This response could indicate an issue with the customer’s card or that the processor doesn't allow this action – contact us for more information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_UNKNOWN
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2037:
setFailoverMerchantMessage(detail, "Already Reversed - The indicated authorization has already been reversed. If you believe this to be false, contact usfor more information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CHARGE
detail.ErrorType = chtype.RESPONSE_ERROR_DUPLICATE
case api.RCode2038:
setFailoverMerchantMessage(detail, "Processor Declined - The customer's bank is unwilling to accept the transaction. The reasons for this response can vary – customer will need to contact their bank for more details.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2039:
setFailoverMerchantMessage(detail, "Invalid Authorization Code - The authorization code was not found or not provided. Have the customer attempt the transaction again – if the decline persists, they will need to contact their bank.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_UNKNOWN
detail.ErrorType = chtype.RESPONSE_ERROR_UNKNOWN
case api.RCode2040:
setFailoverMerchantMessage(detail, "Invalid Store - There may be an issue with the configuration of your account. Have the customer attempt the transaction again – if the decline persists, contact us for more information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CONFIGURATION
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2041:
setFailoverMerchantMessage(detail, "Declined – Call For Approval - The card used for this transaction requires customer approval – they will need to contact their bank.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_VERIFICATION
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2042:
setFailoverMerchantMessage(detail, "Invalid Client ID - There may be an issue with the configuration of your account. Have the customer attempt the transaction again – if the decline persists, contact us for more information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CONFIGURATION
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2043:
setFailoverMerchantMessage(detail, "Error – Do Not Retry, Call Issuer - The card-issuing bank will not allow this transaction. The customer will need to contact their bank for more information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_UNKNOWN
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2044:
setFailoverMerchantMessage(detail, "Declined – Call Issuer - The card-issuing bank has declined this transaction. Have the customer attempt the transaction again – if the decline persists, they will need to contact their bank for more information.")
detail.FailureType = chtype.FAILURE_TYPE_SOFT
detail.Category = chtype.RESPONSE_CATEGORY_UNKNOWN
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2045:
setFailoverMerchantMessage(detail, "Invalid Merchant Number - There is a setup issue with your account. Contact us for more information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CONFIGURATION
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2046:
setFailoverMerchantMessage(detail, "Declined - The customer's bank is unwilling to accept the transaction. For credit/debit card transactions, the customer will need to contact their bank for more details regarding this generic decline; if this is a PayPal transaction, the customer will need to contact PayPal.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2047:
setFailoverMerchantMessage(detail, "Call Issuer. Pick Up Card - The customer’s card has been reported as lost or stolen by the cardholder and the card-issuing bank has requested that merchants keep the card and call the number on the back to report it. As an online merchant, you don’t have the physical card and can't complete this request – obtain a different payment method from the customer.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_PICKUP
case api.RCode2048:
setFailoverMerchantMessage(detail, "Invalid Amount - The authorized amount is set to zero, is unreadable, or exceeds the allowable amount. Make sure the amount is greater than zero and in a suitable format.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CHARGE
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2049:
setFailoverMerchantMessage(detail, "Invalid SKU Number - A non-numeric value was sent with the attempted transaction. Fix errors and resubmit with the transaction with the proper SKU Number.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CHARGE
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2050:
setFailoverMerchantMessage(detail, "Invalid Credit Plan - There may be an issue with the customer’s card or a temporary issue at the card-issuing bank. The customer will need to contact their bank for more information or use a different payment method.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2051:
setFailoverMerchantMessage(detail, "Credit Card Number does not match method of payment - There may be an issue with the customer’s credit card or a temporary issue at the card-issuing bank. Have the customer attempt the transaction again – if the decline persists, ask for a different card or payment method.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2053:
setFailoverMerchantMessage(detail, "Card reported as lost or stolen - The card used was reported lost or stolen. The customer will need to contact their bank for more information or use a different payment method.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_LOST
case api.RCode2054:
setFailoverMerchantMessage(detail, "Reversal amount does not match authorization amount - Either the refund amount is greater than the original transaction or the card-issuing bank does not allow partial refunds. The customer will need to contact their bank for more information or use a different payment method.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CHARGE
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2055:
setFailoverMerchantMessage(detail, "Invalid Transaction Division Number - Contact us for more information regarding this error message.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CONFIGURATION
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2056:
setFailoverMerchantMessage(detail, "Transaction amount exceeds the transaction division limit - Contact us for more information regarding this error message.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CHARGE
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode2057:
setFailoverMerchantMessage(detail, "Issuer or Cardholder has put a restriction on the card - The customer will need to contact their issuing bank for more information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_LOST
case api.RCode2058:
setFailoverMerchantMessage(detail, "Merchant not Mastercard SecureCode enabled - The attempted card can't be processed without enabling 3D Secure for your account. Contact us for more information regarding this feature or contact the customer for a different payment method.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode2059:
setFailoverMerchantMessage(detail, "Address Verification Failed - PayPal was unable to verify that the transaction qualifies for Seller Protection because the address was improperly formatted. The customer should contact PayPal for more information or use a different payment method.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_PERSON
detail.ErrorType = chtype.RESPONSE_ERROR_ADDRESS
case api.RCode2060:
setFailoverMerchantMessage(detail, "Address Verification and Card Security Code Failed - Both the AVS and CVV checks failed for this transaction. The customer should contact PayPal for more information or use a different payment method.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_PERSON
detail.ErrorType = chtype.RESPONSE_ERROR_ADDRESS
case api.RCode2061:
setFailoverMerchantMessage(detail, "Invalid Transaction Data - There may be an issue with the customer’s card or a temporary issue at the card-issuing bank. Have the customer attempt the transaction again – if the decline persists, ask for a different card or payment method.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CHARGE
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode2062:
setFailoverMerchantMessage(detail, "Invalid Tax Amount - There may be an issue with the customer’s card or a temporary issue at the card-issuing bank. Have the customer attempt the transaction again – if the decline persists, ask for a different card or payment method.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CHARGE
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode2063:
setFailoverMerchantMessage(detail, "PayPal Business Account preference resulted in the transaction failing - You can't process this transaction because your account is set to block certain payment types, such as eChecks or foreign currencies. If you believe you have received this decline in error, contact us.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CONFIGURATION
detail.ErrorType = chtype.RESPONSE_ERROR_UNKNOWN
case api.RCode2064:
setFailoverMerchantMessage(detail, "Invalid Currency Code - There may be an issue with the configuration of your account for the currency specified. Contact usfor more information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CONFIGURATION
detail.ErrorType = chtype.RESPONSE_ERROR_ADDRESS
case api.RCode2065:
setFailoverMerchantMessage(detail, "Refund Time Limit Exceeded - PayPal requires that refunds are issued within 180 days of the sale. This refund can't be successfully processed.")
detail.FailureType = chtype.FAILURE_TYPE_SOFT
detail.Category = chtype.RESPONSE_CATEGORY_CONFIGURATION
detail.ErrorType = chtype.RESPONSE_ERROR_LIMIT
case api.RCode2066:
setFailoverMerchantMessage(detail, "PayPal Business Account Restricted - Contact PayPal’s Support team to resolve this issue with your account. Then, you can attempt the transaction again.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CONFIGURATION
detail.ErrorType = chtype.RESPONSE_ERROR_LIMIT
case api.RCode2067:
setFailoverMerchantMessage(detail, "Authorization Expired - The PayPal authorization is no longer valid.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_EXPIRED
case api.RCode2068:
setFailoverMerchantMessage(detail, "PayPal Business Account Locked or Closed - You'll need to contact PayPal’s Support team to resolve an issue with your account. Once resolved, you can attempt to process the transaction again.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CONFIGURATION
detail.ErrorType = chtype.RESPONSE_ERROR_UNAVAILABLE
case api.RCode2069:
setFailoverMerchantMessage(detail, "PayPal Blocking Duplicate Order IDs - The submitted PayPal transaction appears to be a duplicate of a previously submitted transaction. This decline code indicates an attempt to prevent charging the same PayPal account twice for the same service.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_PROCESSING
detail.ErrorType = chtype.RESPONSE_ERROR_DUPLICATE
case api.RCode2070:
setFailoverMerchantMessage(detail, "PayPal Buyer Revoked Pre-Approved Payment Authorization - The customer revoked authorization for this payment method. Reach out to the customer for more information or a different payment method.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2071:
setFailoverMerchantMessage(detail, "PayPal Payee Account Invalid Or Does Not Have a Confirmed Email - Customer has not finalized setup of their PayPal account. Reach out to the customer for more information or a different payment method.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_PERSON
detail.ErrorType = chtype.RESPONSE_ERROR_USER_INPUT
case api.RCode2072:
setFailoverMerchantMessage(detail, "PayPal Payee Email Incorrectly Formatted - Customer made a typo or is attempting to use an invalid PayPal account.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_PERSON
detail.ErrorType = chtype.RESPONSE_ERROR_USER_INPUT
case api.RCode2073:
setFailoverMerchantMessage(detail, "PayPal Validation Error - PayPal can't validate this transaction. Contact us for more details.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2074:
setFailoverMerchantMessage(detail, "Funding Instrument In The PayPal Account Was Declined By The Processor Or Bank, Or It Can't Be Used For This Payment - The customer’s payment method associated with their PayPal account was declined. Reach out to the customer for more information or a different payment method.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2075:
setFailoverMerchantMessage(detail, "Payer Account Is Locked Or Closed - The customer’s PayPal account can't be used for transactions at this time. The customer will need to contact PayPal for more information or use a different payment method.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_UNAVAILABLE
case api.RCode2076:
setFailoverMerchantMessage(detail, "Payer Cannot Pay For This Transaction With PayPal - The customer should contact PayPal for more information or use a different payment method. You may also receive this response if you create transactions using the email address registered with your PayPal Business Account.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode2077:
setFailoverMerchantMessage(detail, "Transaction Refused Due To PayPal Risk Model - PayPal has declined this transaction due to risk limitations. You'll need to contact PayPal’s Support team to resolve this issue.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode2079:
setFailoverMerchantMessage(detail, "PayPal Merchant Account Configuration Error - You'll need to contact us to resolve an issue with your account. Once resolved, you can attempt to process the transaction again.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CONFIGURATION
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2081:
setFailoverMerchantMessage(detail, "PayPal pending payments are not supported - Braintree received an unsupported Pending Verification response from PayPal. Contact Braintree’s Support team to resolve a potential issue with your account settings. If there is no issue with your account, have the customer reach out to PayPal for more information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode2082:
setFailoverMerchantMessage(detail, "PayPal Domestic Transaction Required - This transaction requires the customer to be a resident of the same country as the merchant. Reach out to the customer for a different payment method.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode2083:
setFailoverMerchantMessage(detail, "PayPal Phone Number Required - This transaction requires the payer to provide a valid phone number. The customer should contact PayPal for more information or use a different payment method.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_PERSON
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2084:
setFailoverMerchantMessage(detail, "PayPal Tax Info Required - The customer must complete their PayPal account information, including submitting their phone number and all required tax information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_PERSON
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2085:
setFailoverMerchantMessage(detail, "PayPal Payee Blocked Transaction - Fraud settings on your PayPal business account are blocking payments from this customer. These can be adjusted in the Block Payments section of your PayPal business account.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_PERSON
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2086:
setFailoverMerchantMessage(detail, "PayPal Transaction Limit Exceeded - The settings on the customer's account do not allow a transaction amount this large. They will need to contact PayPal to resolve this issue.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2087:
setFailoverMerchantMessage(detail, "PayPal reference transactions not enabled for your account - PayPal API permissions are not set up to allow reference transactions. You'll need to contact PayPal’s Support team to resolve an issue with your account. Once resolved, you can attempt to process the transaction again.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode2088:
setFailoverMerchantMessage(detail, "Currency not enabled for your PayPal seller account - This currency is not currently supported by your PayPal account. You can accept additional currencies by updating your PayPal profile.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode2089:
setFailoverMerchantMessage(detail, "PayPal payee email permission denied for this request - PayPal API permissions are not set up between your PayPal business accounts. Contact us for more information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_PERSON
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2090:
setFailoverMerchantMessage(detail, "PayPal account not configured to refund more than settled amount - Your PayPal account is not set up to refund amounts higher than the original transaction amount. Contact PayPal's Support team for information on how to enable this.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CONFIGURATION
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode2091:
setFailoverMerchantMessage(detail, "Currency of this transaction must match currency of your PayPal account - Your PayPal account can only process transactions in the currency of your home country. Contact PayPal's Support team for more information.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CONFIGURATION
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode2092:
setFailoverMerchantMessage(detail, "No Data Found - Try Another Verification Method - The processor is unable to provide a definitive answer about the customer's bank account. Please try a different US bank account verification method.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_VERIFICATION
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode2093:
setFailoverMerchantMessage(detail, "PayPal payment method is invalid - The PayPal payment method has either expired or been canceled.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode2094:
setFailoverMerchantMessage(detail, "PayPal payment has already been completed - Your integration is likely making PayPal calls out of sequence. Check the error response for more details.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_ALREADY_DONE
case api.RCode2095:
setFailoverMerchantMessage(detail, "PayPal refund is not allowed after partial refund - Once a PayPal transaction is partially refunded, all subsequent refunds must also be partial refunds for the remaining amount or less. Full refunds are not allowed after a PayPal transaction has been partially refunded.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode2096:
setFailoverMerchantMessage(detail, "PayPal buyer account can't be the same as the seller account - PayPal buyer account can't be the same as the seller account.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode2097:
setFailoverMerchantMessage(detail, "PayPal authorization amount limit exceeded - PayPal authorization amount is greater than the allowed limit on the order.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_LIMIT
case api.RCode2098:
setFailoverMerchantMessage(detail, "PayPal authorization count limit exceeded - The number of PayPal authorizations is greater than the allowed number on the order.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_LIMIT
case api.RCode2099:
setFailoverMerchantMessage(detail, "Cardholder Authentication Required - The customer's bank declined the transaction because a 3D Secure authentication was not performed during checkout. Have the customer authenticate using 3D Secure, then attempt the authorization again.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_VERIFICATION
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode2100:
setFailoverMerchantMessage(detail, "PayPal channel initiated billing not enabled for your account - Your PayPal permissions are not set up to allow channel initiated billing transactions. Contact PayPal's Support team for information on how to enable this. Once resolved, you can attempt to process the transaction again.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode3000:
setFailoverMerchantMessage(detail, "Processor Network Unavailable – Try Again - This response could indicate a problem with the back-end processing network, not necessarily a problem with the payment method. Have the customer attempt the transaction again – if the decline persists, contact us for more information.")
detail.FailureType = chtype.FAILURE_TYPE_SOFT
detail.Category = chtype.RESPONSE_CATEGORY_CONNECTIVITY
detail.ErrorType = chtype.RESPONSE_ERROR_UNAVAILABLE
case api.RCode4001:
setFailoverMerchantMessage(detail, "Settlement Declined - The processor declined to settle the sale or refund request.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CHARGE
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode4003:
setFailoverMerchantMessage(detail, "Already Captured - The transaction has already been fully captured.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CHARGE
detail.ErrorType = chtype.RESPONSE_ERROR_ALREADY_DONE
case api.RCode4004:
setFailoverMerchantMessage(detail, "Already Refunded - The transaction has already been fully refunded.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CHARGE
detail.ErrorType = chtype.RESPONSE_ERROR_ALREADY_DONE
case api.RCode4005:
setFailoverMerchantMessage(detail, "PayPal Risk Rejected - The sale request was rejected by PayPal risk.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode4006:
setFailoverMerchantMessage(detail, "Capture Amount Exceeded Allowable Limit - The specified capture amount exceeded the amount allowed by the processor.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CHARGE
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode4018:
setFailoverMerchantMessage(detail, "PayPal Pending Payments Not Supported - PayPal returned a pending sale or refund response which is disallowed by Braintree. This failure is likely due to a misconfiguration in your PayPal account. Further details may be found in the transaction details.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_UNKNOWN
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode4019:
setFailoverMerchantMessage(detail, "PayPal Refund Transaction with an Open Case Not Allowed - PayPal declined to settle the refund request as there is an open dispute against the transaction. If you have enabled PayPal disputes within Braintree, you may resolve the dispute within the Braintree disputes dashboard. Otherwise, you may do so via your PayPal account's Resolution Center.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode4020:
setFailoverMerchantMessage(detail, "PayPal Refund Attempt Limit Reached - PayPal's maximum number of refund attempts for this transaction has been exceeded.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_LIMIT
case api.RCode4021:
setFailoverMerchantMessage(detail, "PayPal Refund Transaction Not Allowed - PayPal does not allow you to refund this type of transaction.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode4022:
setFailoverMerchantMessage(detail, "PayPal Refund Invalid Partial Amount - The partial refund amount is not valid.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode4023:
setFailoverMerchantMessage(detail, "PayPal Refund Merchant Account Missing ACH - Your PayPal account does not have an associated verified bank account.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81501:
setFailoverMerchantMessage(detail, "Amount cannot be negative. - Even if creating a credit transaction, the amount should be given as x.xx, not -x.xx.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81502:
setFailoverMerchantMessage(detail, "Amount is required. - You'll get this error if amount is not given or is blank.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81503:
setFailoverMerchantMessage(detail, "Amount is an invalid format. - Amount must be formatted like '10' or '10.00'. If the currency does not use decimal places, the amount cannot include decimal places.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81509:
setFailoverMerchantMessage(detail, "Credit card type is not accepted by this merchant account. - The credit card card type must be accepted by your merchant account. Note that there is a different error code when you get this error when creating transactions using tokens (91517).")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode81520:
setFailoverMerchantMessage(detail, "Processor authorization code must be 6 characters. - Processor authorization code must be 6 characters.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81527:
setFailoverMerchantMessage(detail, "Custom field is too long: - Custom field values must be less than 255 characters. The error message for this validation error will contain a list of the custom fields that were too long.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81528:
setFailoverMerchantMessage(detail, "Amount is too large. - The amount cannot be greater than the maximum allowed by the processor. Contact us for your specific limit.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81531:
setFailoverMerchantMessage(detail, "Amount must be greater than zero. - The amount of a transaction cannot be zero.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81534:
setFailoverMerchantMessage(detail, "Tax amount cannot be negative. - The tax amount cannot be less than zero.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81535:
setFailoverMerchantMessage(detail, "Tax amount is an invalid format. - Tax amount must be formatted like '10' or '10.00'. If the currency does not use decimal places, the amount cannot include decimal places.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81536:
setFailoverMerchantMessage(detail, "Tax amount is too large. - The tax amount cannot be longer than 9 digits.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81571:
setFailoverMerchantMessage(detail, "Failed to authenticate, please try a different form of payment. - Failed to authenticate, please try a different form of payment.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode81601:
setFailoverMerchantMessage(detail, "Company is too long. - Maximum 255 characters.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81603:
setFailoverMerchantMessage(detail, "Custom field is too long: - Custom field values must be less than or equal to 255 characters. The error message for this validation error will contain a list of the custom fields that were too long.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81604:
setFailoverMerchantMessage(detail, "Email is an invalid format. - Email must be a well-formed email address. If you are migrating from a system that does not have this constraint and want to record the email address in the Vault, you can use custom_fields")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81605:
setFailoverMerchantMessage(detail, "Email is too long. - Maximum 254 characters.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81606:
setFailoverMerchantMessage(detail, "Email is required if sending a receipt. - This only applies when creating a transaction. If you specify that you want to send a receipt then the customer email will be required.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81607:
setFailoverMerchantMessage(detail, "Fax is too long. - Maximum 255 characters.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81608:
setFailoverMerchantMessage(detail, "First name is too long. - Maximum 255 characters.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81613:
setFailoverMerchantMessage(detail, "Last name is too long. - Maximum 255 characters.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81614:
setFailoverMerchantMessage(detail, "Phone is too long. - Maximum 255 characters.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81615:
setFailoverMerchantMessage(detail, "Website is too long. - Maximum 255 characters.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81616:
setFailoverMerchantMessage(detail, "Website is an invalid format. - Website must be well-formed. The http:// at the beginning is optional. If you want to provide websites that may be not well-formed you can use custom_fields")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81703:
setFailoverMerchantMessage(detail, "Credit card type is not accepted by this merchant account. - Applies when specifying a credit card in a sale or verification request. Not applicable when only storing in the Vault, since Vault records are not associated to specific merchant accounts.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode81706:
setFailoverMerchantMessage(detail, "CVV is required. - CVV will only be required if CVV processing rules are configured to require it. If the rules are configured to require it, then CVV is required when storing a card in the Vault and performing card verification or when creating transactions.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_CVV
case api.RCode81707:
setFailoverMerchantMessage(detail, "CVV must be 4 digits for American Express and 3 digits for other card types. - CVV must be 4 digits for American Express and 3 digits for other card types.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_CVV
case api.RCode81709:
setFailoverMerchantMessage(detail, "Expiration date is required. - You must provide the expiration date either as a single field or as month and year separately.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81710:
setFailoverMerchantMessage(detail, "Expiration date is invalid. - Valid formats are M/YY, M/YYYY, MM/YY, and MM/YYYY. The month must be 1-12 or 01-12.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81711:
setFailoverMerchantMessage(detail, "Expiration year is invalid. It must be between 1975 and 2201. - The expiration year must be greater than 1975 and less than 2201.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81712:
setFailoverMerchantMessage(detail, "Expiration month is invalid. - It must be 1-12 or 01-12.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81713:
setFailoverMerchantMessage(detail, "Expiration year is invalid. - It must be between 1975 and 2201.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81714:
setFailoverMerchantMessage(detail, "Credit card number is required. - You'll get this error if number is omitted or if it is an empty string.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81715:
setFailoverMerchantMessage(detail, "Credit card number is invalid. - The credit card number must pass a Luhn-10 check.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81716:
setFailoverMerchantMessage(detail, "Credit card number must be 12-19 digits. - Inclusive.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81717:
setFailoverMerchantMessage(detail, "Credit card number is not an accepted test number. - Only test numbers can be used in the sandbox.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81718:
setFailoverMerchantMessage(detail, "Credit card number cannot be updated to an unsupported card type when it is associated to subscriptions. - Only applies when using recurring billing. If a credit card is being used for recurring billing subscriptions, the card can only be updated to a card type that is accepted by the merchant account that is being used for the subscriptions.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81723:
setFailoverMerchantMessage(detail, "Cardholder name is too long. - Maximum 175 characters.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81724:
setFailoverMerchantMessage(detail, "Duplicate card exists in the vault. - Duplicate card exists in the vault.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_DUPLICATE
case api.RCode81725:
setFailoverMerchantMessage(detail, "Credit card must include number, payment_method_nonce, or venmo_sdk_payment_method_code. - Credit card must include number, payment_method_nonce, or venmo_sdk_payment_method_code.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81736:
setFailoverMerchantMessage(detail, "CVV verification failed. - CVV was incorrect or not supplied.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_VERIFICATION
detail.ErrorType = chtype.RESPONSE_ERROR_CVV
case api.RCode81737:
setFailoverMerchantMessage(detail, "Postal code verification failed. - Postal code was incorrect or not supplied.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_ADDRESS
case api.RCode81750:
setFailoverMerchantMessage(detail, "Credit card number is prohibited. - Cannot transact with an issuer on OFAC's prohibited list.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_METHOD
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode81801:
setFailoverMerchantMessage(detail, "Addresses must have at least one field filled in. - At least one of the address attributes must be present, but it doesn't matter which one. This doesn't apply when creating transactions—billing and shipping address can be blank unless AVS processing rules are configured to require billing street and postal.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81802:
setFailoverMerchantMessage(detail, "Company is too long. - Maximum 255 characters.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81804:
setFailoverMerchantMessage(detail, "Extended address is too long. - Maximum 255 characters.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81805:
setFailoverMerchantMessage(detail, "First name is too long. - Maximum 255 characters.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81806:
setFailoverMerchantMessage(detail, "Last name is too long. - Maximum 255 characters.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81807:
setFailoverMerchantMessage(detail, "Locality is too long. - Maximum 255 characters.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81808:
setFailoverMerchantMessage(detail, "Postal code is required. - Applies when AVS rules are configured to require postal code.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81809:
setFailoverMerchantMessage(detail, "Postal code may contain no more than 9 letter or number characters. - The length only applies to letters or numbers; it ignores spaces, hyphens, and all other special characters.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81810:
setFailoverMerchantMessage(detail, "Region is too long. - Maximum 255 characters.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81811:
setFailoverMerchantMessage(detail, "Street address is required. - Applies when creating a transaction or performing card verification when AVS rules are configured to require street address.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81812:
setFailoverMerchantMessage(detail, "Street address is too long. - Maximum 255 characters.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81813:
setFailoverMerchantMessage(detail, "Postal code can only contain letters, numbers, spaces, and hyphens. - Postal code must begin with a letter or number, and can only contain letters, numbers, spaces, and hyphens.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81827:
setFailoverMerchantMessage(detail, "US state codes must be two characters to meet PayPal Seller Protection requirements. - US state codes must be two characters to meet PayPal Seller Protection requirements.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81828:
setFailoverMerchantMessage(detail, "Postal code is required for the card type and processor. - The processor you are using requires a postal code to be included for transactions on this card brand.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81901:
setFailoverMerchantMessage(detail, "Cannot edit a canceled subscription. - After a subscription has been canceled it cannot be updated.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode81902:
setFailoverMerchantMessage(detail, "ID has already been taken. - Subscription IDs need to be unique.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_DUPLICATE
case api.RCode81903:
setFailoverMerchantMessage(detail, "Price cannot be blank. - If you provide a price, it can't be an empty string. If you omit the price, then the subscription will inherit the price from the plan.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81904:
setFailoverMerchantMessage(detail, "Price is an invalid format. - Price must be formatted like '10' or '10.00'.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81905:
setFailoverMerchantMessage(detail, "Subscription has already been canceled. - You can't cancel subscriptions that have already been canceled.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81906:
setFailoverMerchantMessage(detail, "ID is invalid (use only letters, numbers, '-', and ''). - If specifying the ID for the subscription, you can only use letters, numbers, and -.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81907:
setFailoverMerchantMessage(detail, "Trial Duration is an invalid format. - It must be 1-3 digits.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81908:
setFailoverMerchantMessage(detail, "Trial Duration is required. - It's required if trial period is set to true.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81909:
setFailoverMerchantMessage(detail, "Trial Duration Unit is invalid. - Valid values are \"day\" and \"month\".")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode81910:
setFailoverMerchantMessage(detail, "Cannot edit an expired subscription. - You cannot edit a subscription with Expired status.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_UNSUPPORTED
case api.RCode81923:
setFailoverMerchantMessage(detail, "Price is too large. - The subscription price cannot be greater than the maximum allowed by the processor. Contact us for your specific limit.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode82301:
setFailoverMerchantMessage(detail, "Settlement Date is required - You must provide a settlement date as the first argument.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode82302:
setFailoverMerchantMessage(detail, "Settlement Date is invalid - The settlement date provided must be a valid date.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode82303:
setFailoverMerchantMessage(detail, "Group By Custom Field is not a valid custom field - The custom field provided must be valid.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode82602:
setFailoverMerchantMessage(detail, "Applicant merchant id is too long. - The merchant account ID cannot be longer than 32 characters.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode82603:
setFailoverMerchantMessage(detail, "Applicant merchant id format is invalid. - You can only use letters, numbers, _ and - for the merchant account ID.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode82604:
setFailoverMerchantMessage(detail, "Applicant merchant id is in use. - Each merchant account ID needs to be unique.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode82605:
setFailoverMerchantMessage(detail, "Applicant merchant id is not allowed. - A merchant account ID may not be named 'all' or 'new.'")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode82606:
setFailoverMerchantMessage(detail, "Master merchant account ID is required. - You must provide a master merchant account ID when creating a merchant account.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode82607:
setFailoverMerchantMessage(detail, "Master merchant account ID is invalid. - You'll get this error if we cannot find a master merchant account with the id specified.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode82608:
setFailoverMerchantMessage(detail, "Master merchant account must be active. - You'll get this error if the supplied master merchant account ID is not active.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode82609:
setFailoverMerchantMessage(detail, "Applicant first name is required. - You must provide the first name of the applicant.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode82610:
setFailoverMerchantMessage(detail, "Terms Of Service needs to be accepted. Applicant tos_accepted required. - You must indicate that the terms of service are accepted.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_CONFIGURATION
detail.ErrorType = chtype.RESPONSE_ERROR_DECLINE
case api.RCode82611:
setFailoverMerchantMessage(detail, "Applicant last name is required. - You must provide the last name of the applicant.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode82612:
setFailoverMerchantMessage(detail, "Applicant date of birth is required. - You must provide the applicant's date of birth.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode82613:
setFailoverMerchantMessage(detail, "Applicant routing number is required. - You must provide the applicant's bank routing number.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode82614:
setFailoverMerchantMessage(detail, "Applicant account number is required. - You must provide the applicant's bank account number.")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST
detail.ErrorType = chtype.RESPONSE_ERROR_PAYLOAD
case api.RCode82615:
setFailoverMerchantMessage(detail, "Applicant SSN must be blank, last 4 digits, or full 9 digits. - The applicant's social security number must be valid (full 9 digits, with or without dashes, or last 4 digits).")
detail.FailureType = chtype.FAILURE_TYPE_HARD
detail.Category = chtype.RESPONSE_CATEGORY_REQUEST