Wdrażanie i testy

Wstęp do wdrażania i testów

Poniżej znajdziesz kilka przydatnych informacji, które sprawią, że wdrażanie płatności PayLane będzie jeszcze łatwiejsze i wygodniejsze.

Używaj konta testowego

Zawsze korzystaj z konta testowego podczas integracji z PayLane. Każde konto tworzone na naszych stronach (np. PayLane.pl lub Developer Zone) jest kontem testowym.

Co istotne, żadne środki nigdy nie zostaną pobrane, zwrócone czy przetworzone w inny sposób, jeśli używasz konta testowego. Wszystko pozostaje zupełnie bezpieczne podczas wdrażania i testów, nawet jeśli coś pójdzie nie tak.

Podstawy wdrożenia i testów

Zanim zaczniesz wywoływać metody naszego API, pamiętaj, aby poprawnie zainicjować PayLane Rest Client. To bardzo łatwe, po prostu załącz odpowiedni plik oraz podaj swoją nazwę użytkownika i hasło.
PayLane Rest Client
PHP/Ruby/Python
include_once ('PayLaneRestClient.php');
$client = new PayLaneRestClient('your_login', 'your_password');
require 'paylane_client'
client = PayLane::Client.new('your_login', 'your_password')
from client import PayLaneRestClient
client = PayLaneRestClient("your_login", "your_password")

Jak wywołać błędy transakcji

To bardzo łatwe – po prostu wprowadź odpowiedni kod błędu jako kwotę transakcji.

Testowe numery kart

Aby dobrze przeprowadzić testy, potrzebujesz oczywiście stosownego zestawu danych kart. Nie ma potrzeby, byś używał do testów własnej karty. Wprawdzie żadne środki nie zostaną z niej pobrane, jeśli korzystasz z konta testowego, to jednak z pewnością będziesz chciał przeprowadzić testy symulujące konkretne sytuacje, np. użycie różnego rodzaju kart. Poniżej znajduje się tabela z zestawem numerów testowych kart, których można używać do symulacji.

Możesz także wywołać konkretne błędy transakcji (dla celów testowych) wpisując kod błędu jako kwotę transakcji.

Common sale tests

Numer Wystawca Test/przeznaczenie
4111111111111111VisaSale successful.
4200000000000000VisaSale successful.
5500000000000004MasterCardSale successful.
370000000000002American ExpressSale successful.
586824160825533338Maestro InternationalSale successful.

3-D Secure tests

Tabela kodów

Numer Wystawca Test/przeznaczenie
4012001036275556VisaUnable to verify card enrollment (enrollment check error 720)
4012001038488884VisaUnable to verify card enrollment (enrollment check error 720)
4012001036298889VisaUnable to verify card enrollment (enrollment check error 720)
4012001038443335Visa3-D Secure Enrollment testing – card not enrolled in 3-D Secure
4012001036853337VisaCard enrolled, verification failed (sale error 703)
4012001036983332VisaCard enrolled, verification failed (sale error 703)
4012001037490006VisaCard enrolled, verification failed (sale error 703)
4012001037167778VisaCard not eligible for 3-D Secure, sale successful
4012001037461114VisaCard enrolled, authentication failure (sale error 704)
4012001037484447VisaCard enrolled, authentication not available (sale error 725)

AVS (Addres Verification System) tests

Tabela kodów

Numer Wystawca Test/przeznaczenie
4055018123456780VisaAVS result “X” (exact match)
4055019123456788VisaAVS result “Y” (exact match)
4055010123456787VisaAVS result “A” (ZIP mismatch)
4055017123456782VisaAVS result “W” (street mismatch)
4055020123456786VisaAVS result “Z” (street mismatch)
4055013123456781VisaAVS result “N” (ZIP and street mismatch)
4055011123456785VisaAVS result “E” (logical error/AVS not supported)
4055012123456783VisaAVS result “G” (logical error/AVS not supported)
4055015123456786VisaAVS result “S” (logical error/AVS not supported)
4055016123456784VisaAVS result “U” (logical error/AVS not supported)
4055014123456789VisaAVS result “R” (technical error/issuer not available)

Kody błędów

Jeśli chcesz wywołać konkretny błąd podczas integrowania się z systemami PayLane (używając konta testowego), po prostu wprowadź odpowiedni kod błędu jako kwotę transakcji.

Tabela kodów

Kod błędu Opis systemowy
302Direct debit is not accessible for this country [account_country_code].
303Direct debit declined.
312Account holder name is not valid.
313Customer name is not valid.
314Customer e-mail is not valid.
315Customer address (street and house) is not valid.
316Customer city is not valid.
317Customer zip code is not valid.
318Customer state is not valid.
319Customer country is not valid.
320Amount is not valid.
321Amount is too low.
322Currency code is not valid.
323Customer IP address is not valid.
324Description is not valid.
325Account country is not valid.
326Bank code (SWIFT/BIC/BLZ) is not valid.
327Account number is not valid.
401Multiple same transactions lock triggered. Wait [number of seconds] s and try again.
402Payment gateway problem. Please try again later.
403Card declined.
404Transaction in this currency [currency code] is not allowed.
405Unknown payment method or method not set.
406More than one payment method provided. Only one payment method is allowed.
407Capture later not possible with this payment method.
408Feature [feature] not available for this payment method.
409Overriding default [feature] not allowed for this merchant account.
410Unsupported payment method.
411Card number format is not valid.
412Card expiration year is not valid.
413Card expiration month is not valid.
414Card expiration year in the past.
415Card has expired.
416Card code (CVV2/CVC2/CID) format is not valid.
417Name on card is not valid.
418Cardholder name is not valid.
419Cardholder e-mail is not valid.
420Cardholder address (street and house) is not valid.
421Cardholder city is not valid.
422Cardholder zip is not valid.
423Cardholder state is not valid.
424Cardholder country is not valid
425Amount is not valid.
426Amount is too low.
427Currency code is not valid.
428Client IP is not valid.
429Description is not valid.
430Unknown card type or card number invalid.
431Card issue number is not valid.
432Fraud check on is not valid.
433AVS level is not valid.
441Sale Authorization ID is not valid.
442Sale Authorization ID not found or the authorization has been closed.
443Capture sale amount greater than the authorization amount.
470Resale without card code is not allowed for this merchant account.
471Sale ID is not valid.
472Resale amount is not valid.
473Amount is too low
474Resale currency code is not valid.
475Resale description is not valid.
476Sale ID not found.
477Cannot resale. Chargeback assigned to Sale ID.
478 Cannot resale this sale.
479Card has expired.
480Cannot resale. Reversal assigned to Sale ID.
481Sale ID is not valid.
482Refund amount is not valid.
483Refund reason is not valid.
484Sale ID not found.
485Cannot refund. Chargeback assigned to Sale ID.
486Cannot refund. Exceeded available refund amount.
487Cannot refund. Sale is already completely refunded.
488Cannot refund this sale.
491Sale ID list is not set or empty
492Sale ID list is too large (more than 100).
493Sale ID [sale_id] at position [number] is not valid.
501Internal server error. Please try again later.
502Payment gateway error. Please try again later.
503Payment method [payment_method_name] not allowed for this merchant account.
505This merchant account is inactive.
601Fraud attempt detected. Score is: [score] (range is 0-100).
611Blacklisted account number found.
612Blacklisted card country found.
613Blacklisted card number found.
614Blacklisted customer country found.
615Blacklisted customer email found.
616Blacklisted customer IP address found.
7013-D Secure authentication server error. Please try again later or use card not enrolled in 3-D Secure.
7023-D Secure authentication server problem. Please try again later or use card not enrolled in 3-D Secure.
7033-D Secure authentication failed. Credit card cannot be accepted for payment.
7043-D Secure authentication failed. Card declined
711Card number format is not valid.
712Card expiration year is not valid.
713Card expiration month is not valid.
714Card has expired.
715Amount is not valid.
716Currency code is not valid.
717Back URL is not valid.
718Unknown card type or card number invalid.
719Card issue number is not valid.
720Unable to verify enrollment for 3-D Secure. You can perform a normal payment without 3-D Secure or decline the transaction.
731Completed authentication with this Secure3d ID not found.
732Sale and 3-D Secure card numbers are different.
733Sale and 3-D Secure card expiration years are different.
734Sale and 3-D Secure card expiration months are different.
735Sale and 3-D Secure amounts are different.
736Sale and 3-D Secure currency codes are different.
737Sale with ID [id_sale] was performed for this Secure3d ID.
780Service fee amount not set.
781Sub-merchant ID not set.
782Company cannot process sub-merchant transactions.
783Invalid sub-merchant ID.
784Sub-merchant is disabled.
785Service fee amount is too low.
786Invalid service fee amount.
787Sub-merchant ID mismatch.

Kody AVS

Tabela kodów

Kod Opis systemowy
AStreet address matches, but 5-digit and 9-digit postal codes do not match.
BStreet address matches, but postal code not verified.
CStreet address and postal code do not match.
DStreet address and postal code match.
EAVS data is invalid or AVS is not allowed for this card type.
FCard member’s name does not match, but billing postal code matches.
GNon-U.S. issuing bank does not support AVS.
HCard member’s name does not match. Street address and postal code match.
IAddress not verified.
JCard member’s name, billing address, and postal code match.
KCard member’s name matches but billing address and billing postal code do not match.
LCard member’s name and billing postal code match, but billing address does not match.
MStreet address and postal code match.
NStreet address and postal code do not match.
OCard member’s name and billing address match, but billing postal code does not match.
PPostal code matches, but street address not verified.
QCard member’s name, billing address, and postal code match.
RSystem unavailable.
SBank does not support AVS.
TCard member’s name does not match, but street address matches.
UAddress information unavailable. Returned if the U.S. bank does not support non-U.S. AVS or if the AVS in a U.S. bank is notfunctioning properly.
VCard member’s name, billing address, and billing postal code match.
WStreet address does not match, but 9-digit postal code matches.
XStreet address and 9-digit postal code match.
YStreet address and 5-digit postal code match
ZStreet address does not match, but 5-digit postal code matches.