Search Overlay

Exceptions

Les API Paysafe permettent de demander certaines exceptions, p. ex. des identifiants non valides, garantissant ainsi la fiabilité du traitement des paiements.

Cliquez sur les liens ci-dessous pour voir nos exemples de code.

client.cardPaymentService().authorize(auth);
client.cardPaymentService().authorize(auth);

Authorization auth = client.cardPaymentService().authorize(Authorization.Builder()
.merchantRefNum("0f8fad5bd9cb469fa16570867728950e")
.amount(4) //The bank has requested that you process the transaction manually by calling the card
.settleWithAuth(false)
.card()
.cardNum("4111111111111111")
.cvv("123")
.cardExpiry()
.month(06)
.year(2020)
.Done()
.Done()
.billingDetails()
.zip("M5H 2N2")
.Done()
.Build());

OptimalApiClient invalidClient = new OptimalApiClient("1234", "5678", Environment.TEST, "12345");
invalidClient.cardPaymentService().get(new Authorization("1234567890"));

client.cardPaymentService().get(new Authorization("1234567890"));
                                

Authorization auth = client.cardPaymentService().authorize(Authorization.Builder()
.merchantRefNum("0f8fad5bd9cb469fa16570867728950e")
.amount(10)
.settleWithAuth(false)
.card()
.cardNum("4111111111111111")
.cvv("123")
.cardExpiry()
.month(06)
.year(2020)
.Done()
.Done()
.Build());

Authorization auth = client.cardPaymentService().authorize(Authorization.Builder()
.merchantRefNum("0f8fad5bd9cb469fa16570867728950e")
.amount(6)
.settleWithAuth(false)
.card()
.cardNum("4111111111111111")
.cvv("123")
.cardExpiry()
.month(06)
.year(2020)
.Done()
.Done()
.billingDetails()
.zip("M5H 2N2")
.Done()
.Build());
Sur cette page