PayPal Test Cases
This page is about the PayPal V2 integration
For information on PayPalExpressCheckoutDeposit see here.
Introduction
Pre-requisites
Before you can start testing the PayPal payment method it must be activated for your merchant/shop. Contact your account manager or the Support team to request this configuration.
A valid request for a PayPal Deposit needs to contain the following details:
- tbd
Test Cases
PayPal Reference Deposit (393)
Pre-requisites
A PayPal Reference Deposit can only be performed if beforehand the customer has set up a successful billing agreement. Find here more information how to setup a new Billing Agreement for PayPal: Paypal Setup New Billing Agreement
Please refer to the Paypal V2 page for information how to create an initiatePayment request for a PayPal Reference Deposit (393).
SUCCESS cases:
PayPal Reference DepositWITH automatic capturing:
Pre-condition: Automatic capturing is enabled for the merchant
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
SUCC_PPREF01 | SUCCESSFUL PayPal Reference Deposit | 1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a payment account which has an existing PayPal Billing Agreement | A Paypal Reference Deposit payment is created and is in the state "DepositedByProvider". |
PayPal Reference DepositWITHOUT automatic capturing:
Pre-condition: Automatic capturing is disabled for the merchant
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
SUCC_PPREF02 | SUCCESSFUL Capture of an initiated PayPal Reference Deposit |
2. Capture the created PayPal Reference Deposit payment by sending the executePaymentAction request with the actionID = 2 (Capture Payment) | The PayPal Reference Deposit is captured successfully and is in the state "DepositedByProvider" |
PENDING cases:
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
PEND_PPREF01 | PENDING PayPal Reference Deposit | 1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e =_PENDING | A Paypal Reference Deposit payment is created and is in the state "PendingOnProvider". |
ERROR cases:
Error occurs during the "create order" phase:
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
ERR_PPREF_CO01 | Missing Billing Agreement | 1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a payment account which does not have an existing PayPal Billing Agreement | A Paypal Reference Deposit payment is created and is in the state "ValidationFailed". |
INVALID_CURRENCY_CODE | 1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e =_INVALID_CURRENCY_CODE | A Paypal Reference Deposit payment is created and is in the state "ExecuteErrorReportedByProvider". ProviderResponseMessage = INVALID_CURRENCY_CODE is returned in the response | |
ERR_PPREF_CO03 | INVALID_COUNTRY_CODE | 1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e =_INVALID_COUNTRY_CODE | A Paypal Reference Deposit payment is created and is in the state "ExecuteErrorReportedByProvider". ProviderResponseMessage = INVALID_COUNTRY_CODE is returned in the response |
ERR_PPREF_CO04 | INTERNAL_SERVER_ERROR | 1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e =_INTERNAL_SERVER_ERROR | A Paypal Reference Deposit payment is created and is in the state "ExecuteErrorReportedByProvider". ProviderResponseCode = INTERNAL_SERVER_ERROR is returned in the response |
Error occurs during the "capture payment for order" phase:
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
ERR_PPREF_CPO01 | COMPLIANCE | 1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e =_COMPLIANCE_VIOLATION | A Paypal Reference Deposit payment is created and is in the state "DepositErrorReportedByProvider". ProviderResponseMessage = COMPLIANCE_VIOLATION is returned in the response |
ERR_PPREF_CPO02 | INVALID | 1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e =_INVALID_RESOURCE_ID | A Paypal Reference Deposit payment is created and is in the state "DepositErrorReportedByProvider". ProviderResponseMessage = INVALID_RESOURCE_ID is returned in the response |
ERR_PPREF_CPO03 | PAYER_ACCOUNT | 1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e =_PAYER_ACCOUNT | A Paypal Reference Deposit payment is created and is in the state "DepositErrorReportedByProvider". ProviderResponseMessage = PAYER_ACCOUNT |
ERR_PPREF_CPO04 | PAYER_ACCOUNT | 1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e =_PAYER_ACCOUNT_RESTRICTED | A Paypal Reference Deposit payment is created and is in the state "DepositErrorReportedByProvider". ProviderResponseMessage = PAYER_ACCOUNT_RESTRICTED is returned in the response |
ERR_PPREF_CPO05 | PAYER_CANNOT_PAY | 1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e =_PAYER_CANNOT_PAY | A Paypal Reference Deposit payment is created and is in the state "DepositErrorReportedByProvider". ProviderResponseMessage = PAYER_CANNOT_PAY is returned in the response |
ERR_PPREFCPO06 | INTERNAL_SERVER | 1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e =_INTERNAL_SERVER_ERROR | A Paypal Reference Deposit payment is created and is in the state "DepositErrorReportedByProvider". ProviderResponseMessage = INTERNAL_SERVER_ERROR is returned in the response |
ERR_PPREF_CPO07 | BILLING_AGREEMENT | 1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e =_BILLING_AGREEMENT_NOT_FOUND | A Paypal Reference Deposit payment is created and is in the state "DepositErrorReportedByProvider". ProviderResponseMessage = BILLING_AGREEMENT |
ERR_PPREF_CPO08 | AGREEMENT_ALREADY | 1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e =_AGREEMENT_ALREADY_CANCELLED | A Paypal Reference Deposit payment is created and is in the state "DepositErrorReportedByProvider". ProviderResponseMessage = AGREEMENT_ALREADY |
REF_PPREF_CPO01 | INSTRUMENT | 1. Create a PayPal Reference Deposit (393) by sending ainitiatePayment request with a specific payment data ForcedProviderRespons_e =_INSTRUMENT_DECLINED | A Paypal Reference Deposit payment is created and is in the state "RefusedByProvider". ProviderResponseMessage = INSTRUMENT_DECLINED is returned in the response |
REF_PPREF_CPO02 | PAYEE_BLOCKED | 1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e =_PAYEE_BLOCKED_TRANSACTION | A Paypal Reference Deposit payment is created and is in the state "RefusedByProvider". ProviderResponseMessage = PAYEE_BLOCKED |
REF_PPREF_CPO03 | TRANSACTION | 1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e =_TRANSACTION_BLOCKED_BY_PAYEE | A Paypal Reference Deposit payment is created and is in the state "RefusedByProvider". ProviderResponseMessage = TRANSACTION |
REF_PPREF_CPO04 | TRANSACTION | 1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e =_TRANSACTION_LIMIT_EXCEEDED | A Paypal Reference Deposit payment is created and is in the state "RefusedByProvider". ProviderResponseMessage = TRANSACTION |
REF_PPREF_CPO05 | TRANSACTION | 1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e =_TRANSACTION_REFUSED | A Paypal Reference Deposit payment is created and is in the state "RefusedByProvider". ProviderResponseMessage = TRANSACTION |
PayPal Redirect Deposit (394)
Please refer to the Paypal V2 page for information how to create an initiatePayment request for a PayPal Reference Deposit (394).
SUCCESS cases:
PayPal Reference DepositWITH automatic capturing:
Pre-condition: Automatic capturing is enabled for the merchant
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
SUCC_PPRED01 | SUCCESSFUL PayPal Redirect Deposit |
3. Customer logs into PayPal page and approves the order |
3a. Merchant is notified by PaymentService if the order has been approved by Customer and PaymentService has queried the order details including the payer details on PayPal. The notification includes the status of the order and the payer (Customer) related details. The Paypal Redirect Deposit payment is in the state "ApprovedByProvider". 3b. Merchant is notified again by PaymentService as soon as the order has been captured successfully by PayPal.
5. The Paypal Redirect Deposit payment is in the state "DepositedByProvider". |
PayPal Reference DepositWITHOUT automatic capturing:
Pre-condition: Automatic capturing is disabled for the merchant
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
SUCC_PPRED02 | SUCCESSFUL PayPal Redirect Deposit |
4. Merchant can capture the created PayPal Redirect Deposit payment by sending the executePaymentAction request with the actionID = 2 (Capture Payment) |
The notification includes the status of the order and the payer (Customer) related details. The Paypal Redirect Deposit payment is in the state "ApprovedByProvider".
6. The Paypal Redirect Deposit payment is in the state "DepositedByProvider". |
PENDING cases:
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
PEND_PPRED01 | PENDING PayPal Redirect Deposit |
3. Customer logs into PayPal page and approves the order |
3a. Merchant is notified by PaymentService if the order has been approved by Customer and PaymentService has queried the order details including the payer details on PayPal. The notification includes the status of the order and the payer (Customer) related details. The Paypal Redirect Deposit payment is in the state "ApprovedByProvider". 3b. Merchant is notified again by PaymentService as soon as the order has been captured successfully by PayPal.
5. The Paypal Redirect Deposit payment is in the state "PendingOnProvider". |
ERROR cases:
Error occurs during the "create order" phase:
Note: The same error cases for PayPal Reference Deposit which are simulated by using a specific payment data "ForcedProviderResponse" can be reproduced here for PayPal Redirected Deposit (394), started with ERR_PPREF_CO02.
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
ERR_PPRED_COxx | <Expected ForcedProviderResponse> | 1. Create a PayPal Redirect Deposit (394) by sending a initiatePayment request with a specific payment data ForcedProviderResponse = <Expected ForcedProviderResponse> | A Paypal Redirect Deposit payment is created and is in the state "ExecuteErrorReportedByProvider". ProviderResponseMessage = <Expected ForcedProviderResponse> is returned in the response |
Error occurs during the "capture payment for order" phase:
Note: The same error cases for PayPal Reference Deposit which are simulated by using a specific payment data "ForcedProviderResponse" can be reproduced here for PayPal Redirected Deposit (394), started with ERR_PPREF_CPO01.
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
ERR_PPRED_CPOxx | <Expected ForcedProviderResponse> |
3. Customer logs into PayPal page and approves the order |
3a. Merchant is notified by PaymentService if the order has been approved by Customer and PaymentService has queried the order details including the payer details on PayPal. The notification includes the status of the order and the payer (Customer) related details. The Paypal Redirect Deposit payment is in the state "ApprovedByProvider". 3b. Merchant is notified again by PaymentService that the order has NOT been captured successfully by PayPal.
ProviderResponseMessage = <Expected ForcedProviderResponse> is sent in the payment state notification. |
REFUSAL | <Expected ForcedProviderResponse> |
3. Customer logs into PayPal page and approves the order |
3a. Merchant is notified by PaymentService if the order has been approved by Customer and PaymentService has queried the order details including the payer details on PayPal. The notification includes the status of the order and the payer (Customer) related details. The Paypal Redirect Deposit payment is in the state "ApprovedByProvider". 3b. Merchant is notified again by PaymentService that the order has NOT been captured successfully by PayPal.
ProviderResponseMessage = <Expected ForcedProviderResponse> is sent in the payment state notification. |
PayPal Reference PreAuthorisation (396)
Please refer to the Paypal V2 page for information how to create an initiatePayment request for a PayPal Reference Deposit (396).
SUCCESS cases:
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
SUCC_PPREFPre01 | SUCCESSFUL PayPal Reference PreAuthorisation |
3. Create a PayPal Reference PreAuthorisation (396) by sending an initiatePayment request containing all required data mentioned in the previous steps and a payment account which has an existing PayPal Billing Agreement | A Paypal Reference PreAuthorisation payment is created and is in the state "ExecutedByProvider". |
PENDING cases:
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
PEND_PPREFPre01 | PENDING PayPal Reference PreAuthorisation |
In addition includes also a specific payment data ForcedProviderRespons_e =_PENDING in the initiatePayment request | A Paypal Reference PreAuthorisation payment is created and is in the state "PendingOnProvider". |
ERROR cases:
Error occurs during the "create order" phase:
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
ERR_PPREFPre01 | INVALID_CURRENCY_CODE |
In addition includes also a specific payment data ForcedProviderRespons_e =_INVALID_CURRENCY_CODE in the initiatePayment request | A Paypal Reference PreAuthorisation payment is created and is in the state "InitiateErrorReportedByProvider". ProviderResponseMessage = INVALID_CURRENCY_CODE is returned in the response |
ERR_PPREFPre02 | INVALID_COUNTRY_CODE |
In addition includes also a specific payment data ForcedProviderRespons_e =_INVALID_COUNTRY_CODE in the initiatePayment request | A Paypal Reference PreAuthorisation payment is created and is in the state "InitiateErrorReportedByProvider". ProviderResponseMessage = INVALID_COUNTRY_CODE is returned in the response |
Error occurs during the "authorize order" phase:
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
ERR_PPREFPre03 | PAYER_ACCOUNT |
In addition includes also a specific payment data ForcedProviderRespons_e =_PAYER_ACCOUNT | A Paypal Reference PreAuthorisation payment is created and is in the state "ExecuteErrorReportedByProvider". ProviderResponseMessage = PAYER_ACCOUNT |
ERR_PPREFPre04 | PAYER_ACCOUNT |
In addition includes also a specific payment data ForcedProviderRespons_e =_PAYER_ACCOUNT | A Paypal Reference PreAuthorisation payment is created and is in the state "ExecuteErrorReportedByProvider". ProviderResponseMessage = PAYER_ACCOUNT |
ERR_PPREFPre05 | PAYER_CANNOT_PAY |
In addition includes also a specific payment data ForcedProviderRespons_e =_PAYER_CANNOT_PAY in the initiatePayment request | A Paypal Reference PreAuthorisation payment is created and is in the state "ExecuteErrorReportedByProvider". ProviderResponseMessage = PAYER_CANNOT_PAY is returned in the response |
ERR_PPREFPre06 | BILLING_AGREEMENT |
In addition includes also a specific payment data ForcedProviderRespons_e =_BILLING_AGREEMENT | A Paypal Reference PreAuthorisation payment is created and is in the state "ExecuteErrorReportedByProvider". ProviderResponseMessage = BILLING_AGREEMENT |
ERR_PPREFPre07 | AGREEMENT_ |
In addition includes also a specific payment data ForcedProviderRespons_e =_AGREEMENT | A Paypal Reference PreAuthorisation payment is created and is in the state "ExecuteErrorReportedByProvider". ProviderResponseMessage = AGREEMENT |
ERR_PPREFPre08 | DENIED |
In addition includes also a specific payment data ForcedProviderRespons_e =_DENIED in the initiatePayment request | A Paypal Reference PreAuthorisation payment is created and is in the state "RefusedByProvider". ProviderResponseMessage = DENIED is returned in the response |
PayPal Redirect PreAuthorisation (395)
Please refer to the Paypal V2 page for information how to create an initiatePayment request for a PayPal Reference Deposit (395).
SUCCESS cases:
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
SUCC_PPREDPre01 | SUCCESSFUL PayPal Redirect PreAuthorisation |
3. Customer logs into PayPal page and approves the order |
6. The Paypal Redirect PreAuthorisation payment is in the state "ExecutedByProvider". |
PENDING cases:
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
PEND_PPREDPre01 | PENDING PayPal Redirect PreAuthorisation |
3. Customer logs into PayPal page and approves the order |
ProviderResponseMessage = PENDING is returned in the response |
ERROR cases:
Error occurs during the "create order" phase:
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
ERR_PPREDPre01 | INVALID_CURRENCY_CODE |
3. Create a PayPal Redirect PreAuthorisation (395) by sending a initiatePayment request containing all required data mentioned in the previous steps and the following specific payment data in addition:
|
ProviderResponseMessage = INVALID_CURRENCY_CODE is returned in the response |
ERR_PPREDPre02 | INVALID_COUNTRY_CODE |
3. Create a PayPal Redirect PreAuthorisation (395) by sending a initiatePayment request containing all required data mentioned in the previous steps and the following specific payment data in addition:
|
ProviderResponseMessage = INVALID_COUNTRY_CODE is returned in the response |
Error occurs during the "authorize order" phase:
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
ERR_PPREDPre03 | PAYER_ACCOUNT |
3. Customer logs into PayPal page and approves the order |
ProviderResponseMessage = PAYER_ACCOUNT |
ERR_PPREDPre04 | PAYER_ACCOUNT |
3. Customer logs into PayPal page and approves the order |
ProviderResponseMessage = PAYER_ACCOUNT |
ERR_PPREDPre05 | PAYER_CANNOT_PAY |
3. Customer logs into PayPal page and approves the order |
ProviderResponseMessage = PAYER_CANNOT_PAY is returned in the response |
ERR_PPREDPre06 | DENIED |
3. Customer logs into PayPal page and approves the order |
ProviderResponseMessage = DENIED is returned in the response |
PayPal Capture (410)
Please refer to the Paypal V2 page for information how to create an initiatePayment request for a PayPal Capture (410).
SUCCESS cases:
PayPal CaptureWITH automatic capturing:
Pre-condition: Automatic capturing is enabled for the merchant
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
SUCC_PPCAP01 | SUCCESSFUL PayPal Capture |
- PaymentDescription (optional)
| A Paypal Capture payment is created and is in the state "CapturedByProvider". |
PENDING cases:
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
PEND_PPCAP01 | PENDING PayPal Capture | Precondition:
- ForcedProviderRespons_e =_PENDING
| A Paypal Capture payment is created and is in the state "PendingOnProvider". ProviderResponseMessage = PENDING is returned in the response |
ERROR cases:
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
ERR_PPCAP01 | PAYER_ACCOUNT |
- ForcedProviderRespons_e =_PAYER_ACCOUNT
| A Paypal Capture payment is created and is in the state "CaptureErrorReportedByProvider". ProviderResponseMessage = PAYER_ACCOUNT |
ERR_PPCAP02 | PAYER_CANNOT_PAY |
- ForcedProviderRespons_e =_PAYER_CANNOT_PAY
| A Paypal Capture payment is created and is in the state "CaptureErrorReportedByProvider". ProviderResponseMessage = PAYER_CANNOT_PAY is returned in the response |
ERR_PPCAP03 | TRANSACTION_REFUSED |
- ForcedProviderRespons_e =_TRANSACTION_REFUSED
| A Paypal Capture payment is created and is in the state "CaptureRefused". ProviderResponseMessage = TRANSACTION_REFUSED is returned in the response |
PayPal Refund (400)
Detailed information for integrating Paypal Refunds (400) can be found in the Refund a PayPal Payment documentation.
-
A PayPal Refund can be created from a [PayPal Reference/Redirect Deposit] (#Refund_ReferenceRedirectDeposit)
-
A PayPal Refund can be created from a [PayPal Capture] (#Refund_PayPalCapture)
-
A PayPal Refund can be created from a PayPal Reference/Redirect Preauthorisation
SUCCESS cases:
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
SUCC_PPR01 | SUCCESSFUL PayPal Refund |
2. Create a PayPal Refund (400) by sending a _initiatePaymentFromRefe_rence request with the following data:
| A Paypal Refund payment is created and is in the state "Refunded". |
SUCC_PPR02 | SUCCESSFUL PayPal Refund |
3. Create a PayPal Refund (400) by sending a _initiatePaymentFromRefe_rence request with the following data:
| A Paypal Refund payment is created and is in the state "Refunded". |
PENDING cases:
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
PEND_PPR01 | PENDING PayPal Refund |
2. Create a PayPal Refund (400) by sending a _initiatePaymentFromRefe_rence request with the following data:
| A Paypal Refund payment is created and is in the state "PendingOnProvider". |
ERROR cases:
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
ERR_PPR01 | UNSUCCESSFUL PayPal Refund |
2. Create a PayPal Refund (400) by sending a _initiatePaymentFromRefe_rence request with the following data:
| No Paypal Refund payment is created The following error is returned: . |
ERR_PPR02 | UNSUCCESSFUL PayPal Refund |
2. Create a PayPal Refund (400) by sending a _initiatePaymentFromRefe_rence request with the following data:
| No Paypal Refund payment is created The following error is returned: |
ERR_PPR03 | UNSUCCESSFUL PayPal Refund |
2. Create a PayPal Refund (400) by sending a _initiatePaymentFromRefe_rence request with the following data:
| No Paypal Refund payment is created The following error is returned: |
ERR_PPR04 | UNSUCCESSFUL PayPal Refund |
2. Create a PayPal Refund (400) by sending a _initiatePaymentFromRefe_rence request with the following data:
| No Paypal Refund payment is created The following error is returned: |
ERR_PPR05 | INTERNAL_SERVER_ERROR |
2. Create a PayPal Refund (400) by sending a _initiatePaymentFromRefe_rence request with the following data:
| A Paypal Refund payment is created and is in the state "RefundRefusedByProvider". |
ERR_PPR06 | INVALID_RESOURCE_ID |
2. Create a PayPal Refund (400) by sending a _initiatePaymentFromRefe_rence request with the following data:
| A Paypal Refund payment is created and is in the state "RefundRefusedByProvider". |
SUCCESS cases:
PENDING cases:
ERROR cases:
Refund created from a PayPal Reference/Redirect Preauthorisation (bulk refund)
SUCCESS cases:
PENDING cases:
ERROR cases:
PayPal Cancellation (429)
Please refer to the related Paypal V2 page for information how to cancel a PayPal Reference Preauthorisation (396) or a PayPal Redirect Preauthorisation (395).
SUCCESS cases:
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
SUCC_PPC01 | SUCCESSFUL full PayPal Cancellation of a PayPal Preauthorisation |
The Preauthorisation payment should be in the state "ExecutedByProvider" 2. Create a PayPal Cancellation (429) by sending the executePaymentAction request with the actionID = 1 (Cancel) | A Paypal Cancellation payment with an amount of 50 EUR is created and is in the state "Cancelled". |
SUCC_PPC02 | SUCCESSFUL partial PayPal Cancellation of a PayPal Preauthorisation which has a partial successful PayPal Capture payment |
The Preauthorisation payment should be in the state "ExecutedByProvider"
The Capture payment should be in the state "CapturedByProvider" 3. Create a PayPal Cancellation (429) by sending the executePaymentAction request with the actionID = 1 (Cancel) | A Paypal Cancellation payment with an amount of 20 EUR is created and is in the state "Cancelled". |
SUCC_PPC03 | SUCCESSFUL full PayPal Cancellation of a PayPal Preauthorisation which has a partial unsuccessful PayPal Capture payment |
The Capture payment is in one of the following states:
3. Create a _PayPal Cancellation* (429) by sending the executePaymentAction request with the actionID = 1 (Cancel) | A Paypal Cancellation payment with an amount of 50 EUR is created and is in the state "Cancelled". |
ERROR cases:
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
ERR_PPC01 | UNSUCCESSFUL PayPal Cancellation |
The Preauthorization payment could be in one of the following states:
| A Paypal Cancellation payment is not created. |
ERR_PPC02 | CANNOT_BE_VOIDED |
- ForcedProviderResponse = CANNOT_BE_VOIDED | A Paypal Cancellation payment with an amount of 50 EUR is created and is in the state "CancelRefusedByProvider". |
ERR_PPC03 | PREVIOUSLY_CAPTURED |
- ForcedProviderResponse = PREVIOUSLY_CAPTURED | A Paypal Cancellation payment with an amount of 50 EUR is created and is in the state "CancelRefusedByProvider". |
ERR_PPC04 | PREVIOUSLY_VOIDED |
- ForcedProviderResponse = PREVIOUSLY_VOIDED | A Paypal Cancellation payment with an amount of 50 EUR is created and is in the state "CancelRefusedByProvider". |
The following scenarios need to be covered by the merchant but cannot be tested against the PXP test system.
# | Test Case Name | Expected Outcome |
---|---|---|
ERR_PPC02 | UNSUCCESSFUL PayPal Cancellation | A Paypal Cancellation payment is created and is in the state "CancelRefusedByProvider". |
PayPal Cancellation via Payment Service Admin
SUCCESS cases:
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
SUCC_PSA_PPC01 | SUCCESSFUL full PayPal Cancellation of a PayPal Preauthorisation |
2. Execute the action "CancelPayment" within the Preauthorisation payment | A Paypal Cancellation payment with an amount of 50 EUR is created and is in the state "Cancelled". |
SUCC_PSA_PPC2 | SUCCESSFUL partial PayPal Cancellation of a PayPal Preauthorisation which has a successful partial PayPal Capture |
2. Execute the action "CancelPayment" within the Preauthorisation payment | A Paypal Cancellation payment with an amount of 20 EUR is created and is in the state "Cancelled". |
ERROR cases:
The "CancelPayment" action is only available within the "successfully executed" Preauthorisation payment, for this reason error cases mentioned above is not applicable for PayPal Cancellation via PS Admin.
"CancelPayment" action within the Preauthorisation payment:

Negative Testing against Provider PayPal
Instead of testing against the PXP Financial MOCK using the above described test scenarios, it is also possible to test against the provider system directly.
This requires activation, please contact support...
To force a certain provider response, the following API field has to be provided:
Field | Value |
---|---|
ForcedProviderResponse | For PayPal Reference Deposit: see the related PayPal API documentation or tables below |
PayPal will respond with the same error code as sent in the field "ForcedProviderResponse"
A sample InitiatePayment request with the field "ForcedProviderResponse":
<initiatePaymentRequest xmlns="http://www.cqrpayments.com/PaymentProcessing" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<merchantID>{{merchant}}</merchantID>
<shopID>{{shop}}</shopID>
<merchantTransactionID>{{merchantTransactionID}}</merchantTransactionID>
<paymentMethodID>393</paymentMethodID>
<amount currencyCode="eur">200</amount>
<userID>45cd3c7f-f5fb-4d44-b4bc-8b17da</userID>
<userIP>80.121.151.158</userIP>
<userSessionID>t02d03hwaxkrl5gmabcypwmm</userSessionID>
<creationTypeID>1</creationTypeID>
<specificPaymentData>
<data xsi:type="keyStringValuePair">
<key>PaymentDescription</key>
<value><![CDATA[My PayPal & äüöáè payment description!]]></value>
</data>
<data xsi:type="keyStringValuePair">
<key>PaymentCountryCode</key>
<value>AT</value>
</data>
<data xsi:type="keyStringValuePair">
<key>CultureInfo</key>
<value>en-AT</value>
</data>
<data xsi:type="keyStringValuePair">
<key>BrandName</key>
<value><![CDATA[My Brand & äüöáè]]></value>
</data>
<data xsi:type="keyStringValuePair">
<key>UserStatementText</key>
<value><![CDATA[My SoftDiscriptoräüöáè]]></value>
</data>
<data xsi:type="keyStringValuePair">
<key>ForcedProviderResponse</key>
<value>INTERNAL_SERVER_ERROR</value>
</data>
</specificPaymentData>
<paymentAccountID>2e6a7953-d7e7-4345-82e9-8539ece1409e</paymentAccountID>
</initiatePaymentRequest>
List of reproducible errors (PayPal Reference Deposit)
Error occurs during the "create order" phase:
Value for the "ForcedProviderResponse" field | Description | Expected payment state |
---|---|---|
INTERNAL_SERVER_ERROR | An internal server error has occurred. | ExecuteErrorReportedByProvider |
INVALID_COUNTRY_CODE | Country code is invalid. | ExecuteErrorReportedByProvider |
INVALID_CURRENCY_CODE | Currency code is invalid or is not currently supported. | ExecuteErrorReportedByProvider |
Error occurs during the "capture payment for order" phase:
Value for the "ForcedProviderResponse" field | Description | Expected payment state |
---|---|---|
AGREEMENT_ALREADY_CANCELLED | The requested agreement is already cancelled. | DepositErrorReportedByProvider |
BILLING_AGREEMENT_NOT_FOUND | The requested Billing Agreement token was not found. | DepositErrorReportedByProvider |
COMPLIANCE_VIOLATION | Transaction cannot be processed due to a possible compliance violation. | DepositErrorReportedByProvider |
INSTRUMENT_DECLINED | The funding instrument presented was either declined by the processor or bank. | RefusedByProvider |
INVALID_RESOURCE_ID | Specified resource ID does not exist. | DepositErrorReportedByProvider |
PAYEE_BLOCKED_TRANSACTION | The fraud settings for this seller are such that this payment cannot be executed. | RefusedByProvider |
PAYER_ACCOUNT_LOCKED_OR_CLOSED | Payer account is locked or closed. | DepositErrorReportedByProvider |
PAYER_ACCOUNT_RESTRICTED | Payer account is restricted. | DepositErrorReportedByProvider |
PAYER_CANNOT_PAY | Payer cannot pay for this transaction. | DepositErrorReportedByProvider |
TRANSACTION_BLOCKED_BY_PAYEE | The requested action could not be performed, semantically incorrect, or failed business validation. | RefusedByProvider |
TRANSACTION_LIMIT_EXCEEDED | Total payment amount exceeded transaction limit. | RefusedByProvider |
TRANSACTION_REFUSED | The transaction was refused. | RefusedByProvider |
List of reproducible errors (PayPal Refund)
Value for the "ForcedProviderResponse" field | Description | Expected payment state |
---|---|---|
INTERNAL_SERVER_ERROR | An internal server error has occurred. | RefundRefusedByProvider |
INVALID_RESOURCE_ID | Specified resource ID does not exist. Please check the resource ID and try again. | RefundRefusedByProvider |
List of reproducible errors (PayPal Cancellation)
Value for the "ForcedProviderResponse" field | Description | Expected payment state |
---|---|---|
CANNOT_BE_VOIDED | A reauthorization cannot be voided. Please void the original parent authorization. | CancelRefusedByProvider |
PREVIOUSLY_CAPTURED | Authorization has been previously captured and hence cannot be voided. | CancelRefusedByProvider |
PREVIOUSLY_VOIDED | Authorization has been previously voided and hence cannot be voided again. | CancelRefusedByProvider |
Updated 12 days ago