@@ -214,37 +214,26 @@ public function getXenditSubscriptionCallbackUrl($isMultishipping = false) {
214
214
*/
215
215
public function failureReasonInsight ($ failureReason )
216
216
{
217
+ $ cardDeclinedReason = 'The card you are trying to use has been declined. Please try again with a different card. ' ;
217
218
switch ($ failureReason ) {
218
219
case 'CARD_DECLINED ' :
219
- case 'STOLEN_CARD ' : return 'The bank that issued this card declined the payment but didn \'t tell us why.
220
- Try another card, or try calling your bank to ask why the card was declined. ' ;
221
- case 'INSUFFICIENT_BALANCE ' : return "Your bank declined this payment due to insufficient balance. Ensure
222
- that sufficient balance is available, or try another card " ;
223
- case 'INVALID_CVN ' : return "Your bank declined the payment due to incorrect card details entered. Try to
224
- enter your card details again, including expiration date and CVV " ;
225
- case 'INACTIVE_CARD ' : return "This card number does not seem to be enabled for eCommerce payments. Try
226
- another card that is enabled for eCommerce, or ask your bank to enable eCommerce payments for your card. " ;
227
- case 'EXPIRED_CARD ' : return "Your bank declined the payment due to the card being expired. Please try
228
- another card that has not expired. " ;
229
- case 'PROCESSOR_ERROR ' : return 'We encountered issue in processing your card. Please try again with another card ' ;
230
- case 'USER_DID_NOT_AUTHORIZE_THE_PAYMENT ' :
231
- return 'Please complete the payment request within 60 seconds. ' ;
232
- case 'USER_DECLINED_THE_TRANSACTION ' :
233
- return 'You rejected the payment request, please try again when needed. ' ;
234
- case 'PHONE_NUMBER_NOT_REGISTERED ' :
235
- return 'Your number is not registered in OVO, please register first or contact OVO Customer Service. ' ;
236
- case 'EXTERNAL_ERROR ' :
237
- return 'There is a technical issue happens on OVO, please contact the merchant to solve this issue. ' ;
238
- case 'SENDING_TRANSACTION_ERROR ' :
239
- return 'Your transaction is not sent to OVO, please try again. ' ;
240
- case 'EWALLET_APP_UNREACHABLE ' :
241
- return 'Do you have OVO app on your phone? Please check your OVO app on your phone and try again. ' ;
242
- case 'REQUEST_FORBIDDEN_ERROR ' :
243
- return 'Your merchant disable OVO payment from his side, please contact your merchant to re-enable it
244
- before trying it again. ' ;
245
- case 'DEVELOPMENT_MODE_PAYMENT_ACKNOWLEDGED ' :
246
- return 'Development mode detected. Please refer to our documentations for successful payment
247
- simulation ' ;
220
+ return $ cardDeclinedReason . ' Code: 200011 ' ;
221
+ case 'STOLEN_CARD ' :
222
+ return $ cardDeclinedReason . ' Code: 200013 ' ;
223
+ case 'INSUFFICIENT_BALANCE ' :
224
+ return $ cardDeclinedReason . ' Code: 200012 ' ;
225
+ case 'INVALID_CVN ' :
226
+ return 'Please verify that all credit card information is correct. Code: 200015 ' ;
227
+ case 'INACTIVE_CARD ' :
228
+ return $ cardDeclinedReason . ' Code: 200014 ' ;
229
+ case 'EXPIRED_CARD ' :
230
+ return 'The card you are trying to use has expired. Please try again with a different card. Code: 200010 ' ;
231
+ case 'PROCESSOR_ERROR ' :
232
+ return 'We encountered an issue processing your checkout, please contact us. Code: 200009 ' ;
233
+ case 'AUTHENTICATION_FAILED ' :
234
+ return 'Authentication process failed. Please try again. Code: 200001 ' ;
235
+ case 'UNEXPECTED_PLUGIN_ISSUE ' :
236
+ return 'We encountered an issue processing your checkout, please contact us. Code: 999999 ' ;
248
237
default : return $ failureReason ;
249
238
}
250
239
}
0 commit comments