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.
apiClient.cardPaymentService().authorize(auth);
apiClient.cardPaymentService().authorize(auth);
Authorization auth =
Authorization.builder()
.merchantRefNum("0f8fad5bd9cb469fa16570867728950e")
.amount(4) //The bank has requested that you process the transaction manually by calling the card
.settleWithAuth(true)
.card()
.cardNum("4111111111111111")
.cvv(123)
.cardExpiry()
.month(2)
.year(2023)
.done()
.done()
.billingDetails()
.zip("M5H 2N2")
.done()
.build();
apiClient.cardPaymentService().authorize(auth);
NetBanxApiClient invalidClient = new NetBanxApiClient("invalid-key", "invalid-code", Environment.TEST, 12345);
Authorization auth =
Authorization.builder()
.id("123456789")
.done()
.build();
invalidClient.cardPaymentService().authorize(auth);
AuthorizationId authId = AuthorizationId.builder().id("errorTest").build();
apiClient.cardPaymentService().getAuth(authId);
Authorization auth =
Authorization.builder()
.merchantRefNum("0f8fad5bd9cb469fa16570867728950e")
.amount(10)
.card()
.cardNum("4111111111111111")
.cvv(123)
.cardExpiry()
.month(2)
.year(2023)
.done()
.done()
.build();
apiClient.cardPaymentService().authorize(auth);
Authorization auth =
Authorization.builder()
.merchantRefNum("0f8fad5bd9cb469fa16570867728950e")
.amount(6)
.settleWithAuth(true)
.card()
.cardNum("4111111111111111")
.cvv(123)
.cardExpiry()
.month(2)
.year(2023)
.done()
.done()
.billingDetails()
.zip("M5H 2N2")
.done()
.build();
apiClient.cardPaymentService().authorize(auth);
Cette page a-t-elle été utile ?
Sur cette page