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.
auth_obj = Authorization(None)
card_obj = Card(None)
cardExpiry_obj = CardExpiry(None)
billing_obj = BillingDetails(None)
auth_obj.merchantRefNum("41sdfsf21hjh1561dfd1341dfdf511")
auth_obj.amount("1")
auth_obj.settleWithAuth("false")
card_obj.cardNum("4111111111111111")
card_obj.cvv("123")
auth_obj.card(card_obj)
cardExpiry_obj.month("12")
cardExpiry_obj.year("2017")
card_obj.cardExpiry(cardExpiry_obj)
billing_obj.zip("M5H 2N2")
auth_obj.billingDetails(billing_obj)
response_object = self.client.card_payments_service_handler().create_authorization(auth_obj)
response_object = self.client.card_payments_service_handler().create_authorization(auth_obj)
auth_obj = Authorization(None)
card_obj = Card(None)
cardExpiry_obj = CardExpiry(None)
billing_obj = BillingDetails(None)
auth_obj.merchantRefNum("41sdfsf111hjh1111dfd1111dfdf111")
auth_obj.amount("4")
auth_obj.settleWithAuth("true")
card_obj.cardNum("4111111111111111")
card_obj.cvv("123")
auth_obj.card(card_obj)
cardExpiry_obj.month("2")
cardExpiry_obj.year("2017")
card_obj.cardExpiry(cardExpiry_obj)
billing_obj.zip("M5H 2N2")
auth_obj.billingDetails(billing_obj)
response_object = self.client.card_payments_service_handler().create_authorization(auth_obj)
client_bad_req = OptimalApiClient("dev-53224", "89764-353224", "TEST")
auth_obj = Authorization(None)
card_obj = Card(None)
cardExpiry_obj = CardExpiry(None)
billing_obj = BillingDetails(None)
auth_obj.merchantRefNum(RandomTokenGenerator().generateToken())
auth_obj.amount("41")
auth_obj.settleWithAuth("true")
card_obj.cardNum("4111111111111111")
card_obj.cvv("123")
auth_obj.card(card_obj)
cardExpiry_obj.month("2")
cardExpiry_obj.year("2017")
card_obj.cardExpiry(cardExpiry_obj)
billing_obj.zip("M5H 2N2")
auth_obj.billingDetails(billing_obj)
response_object = self.client_bad_req.card_payments_service_handler().create_authorization(auth_obj)
auth_obj = Authorization(None)
auth_obj.id("8976435322347893749387345344")
response_object = self.client.card_payments_service_handler().lookup_authorization_with_id(auth_obj)
auth_obj = Authorization(None)
card_obj = Card(None)
cardExpiry_obj = CardExpiry(None)
auth_obj.merchantRefNum("787sdfsf4564hjh13434dfd343dfd3431")
auth_obj.amount("10")
auth_obj.settleWithAuth("true")
card_obj.cardNum("4111111111111111")
card_obj.cvv("123")
auth_obj.card(card_obj)
cardExpiry_obj.month("2")
cardExpiry_obj.year("2017")
card_obj.cardExpiry(cardExpiry_obj)
response_object = self.client.card_payments_service_handler().create_authorization(auth_obj)
auth_obj = Authorization(None)
card_obj = Card(None)
cardExpiry_obj = CardExpiry(None)
billing_obj = BillingDetails(None)
auth_obj.merchantRefNum("34534sdfsf54765hjh456dfd456dfdt7567")
auth_obj.amount("6")
auth_obj.settleWithAuth("true")
card_obj.cardNum("4111111111111111")
card_obj.cvv("123")
auth_obj.card(card_obj)
cardExpiry_obj.month("2")
cardExpiry_obj.year("2017")
card_obj.cardExpiry(cardExpiry_obj)
billing_obj.zip("M5H 2N2")
auth_obj.billingDetails(billing_obj)
response_object = self.client.card_payments_service_handler().create_authorization(auth_obj)
Cette page a-t-elle été utile ?
Sur cette page