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 Deposit WITH automatic capturing:

📘

Pre-condition: Automatic capturing is enabled for the merchant

#Test Case NameSteps to ExecuteExpected Outcome
SUCC_PPREF01SUCCESSFUL PayPal Reference Deposit1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a payment account which has an existing PayPal Billing AgreementA Paypal Reference Deposit payment is created and is in the state "DepositedByProvider".

PayPal Reference Deposit WITHOUT automatic capturing:

📘

Pre-condition: Automatic capturing is disabled for the merchant

#Test Case NameSteps to ExecuteExpected Outcome
SUCC_PPREF02SUCCESSFUL Capture of an initiated PayPal Reference Deposit1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a payment account which has an existing PayPal Billing Agreement and the payment should be initiated in the state "ExecutedByProvider"

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 NameSteps to ExecuteExpected Outcome
PEND_PPREF01PENDING PayPal Reference Deposit1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e = _PENDINGA Paypal Reference Deposit payment is created and is in the state "PendingOnProvider".

ERROR cases:

Error occurs during the "create order" phase:

#Test Case NameSteps to ExecuteExpected Outcome
ERR_PPREF_CO01Missing Billing Agreement1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a payment account which does not have an existing PayPal Billing AgreementA Paypal Reference Deposit payment is created and is in the state "ValidationFailed".

ERR_PPREF_CO02
INVALID_CURRENCY_CODE1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e = _INVALID_CURRENCY_CODEA Paypal Reference Deposit payment is created and is in the state "ExecuteErrorReportedByProvider".

ProviderResponseMessage = INVALID_CURRENCY_CODE is returned in the response
ERR_PPREF_CO03INVALID_COUNTRY_CODE1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e = _INVALID_COUNTRY_CODEA Paypal Reference Deposit payment is created and is in the state "ExecuteErrorReportedByProvider".

ProviderResponseMessage = INVALID_COUNTRY_CODE is returned in the response
ERR_PPREF_CO04INTERNAL_SERVER_ERROR1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e = _INTERNAL_SERVER_ERRORA 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 NameSteps to ExecuteExpected Outcome

ERR_PPREF_CPO01
COMPLIANCE
_VIOLATION
1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e = _COMPLIANCE_VIOLATIONA Paypal Reference Deposit payment is created and is in the state "DepositErrorReportedByProvider".

ProviderResponseMessage = COMPLIANCE_VIOLATION is returned in the response
ERR_PPREF_CPO02INVALID
_RESOURCE_ID
1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e = _INVALID_RESOURCE_IDA Paypal Reference Deposit payment is created and is in the state "DepositErrorReportedByProvider".

ProviderResponseMessage = INVALID_RESOURCE_ID is returned in the response
ERR_PPREF_CPO03PAYER_ACCOUNT
_LOCKED_OR_CLOSED
1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e = _PAYER_ACCOUNT
_LOCKED_OR_CLOSED
A Paypal Reference Deposit payment is created and is in the state "DepositErrorReportedByProvider".

ProviderResponseMessage = PAYER_ACCOUNT
_LOCKED_OR_CLOSED
is returned in the response
ERR_PPREF_CPO04PAYER_ACCOUNT
_RESTRICTED
1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e = _PAYER_ACCOUNT_RESTRICTEDA Paypal Reference Deposit payment is created and is in the state "DepositErrorReportedByProvider".

ProviderResponseMessage = PAYER_ACCOUNT_RESTRICTED is returned in the response
ERR_PPREF_CPO05PAYER_CANNOT_PAY1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e = _PAYER_CANNOT_PAYA Paypal Reference Deposit payment is created and is in the state "DepositErrorReportedByProvider".

ProviderResponseMessage = PAYER_CANNOT_PAY is returned in the response
ERR_PPREFCPO06INTERNAL_SERVER
_ERROR
1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e = _INTERNAL_SERVER_ERRORA Paypal Reference Deposit payment is created and is in the state "DepositErrorReportedByProvider".

ProviderResponseMessage = INTERNAL_SERVER_ERROR is returned in the response
ERR_PPREF_CPO07BILLING_AGREEMENT
_NOT_FOUND
1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e = _BILLING_AGREEMENT_NOT_FOUNDA Paypal Reference Deposit payment is created and is in the state "DepositErrorReportedByProvider".

ProviderResponseMessage = BILLING_AGREEMENT
_NOT_FOUND
is returned in the response
ERR_PPREF_CPO08AGREEMENT_ALREADY
_CANCELLED
1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e = _AGREEMENT_ALREADY_CANCELLEDA Paypal Reference Deposit payment is created and is in the state "DepositErrorReportedByProvider".

ProviderResponseMessage = AGREEMENT_ALREADY
_CANCELLED
is returned in the response
REF_PPREF_CPO01INSTRUMENT
_DECLINED
1. Create a PayPal Reference Deposit (393) by sending ainitiatePayment request with a specific payment data ForcedProviderRespons_e = _INSTRUMENT_DECLINEDA Paypal Reference Deposit payment is created and is in the state "RefusedByProvider".

ProviderResponseMessage = INSTRUMENT_DECLINED is returned in the response
REF_PPREF_CPO02PAYEE_BLOCKED
_TRANSACTION
1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e = _PAYEE_BLOCKED_TRANSACTIONA Paypal Reference Deposit payment is created and is in the state "RefusedByProvider".

ProviderResponseMessage = PAYEE_BLOCKED
_TRANSACTION
is returned in the response
REF_PPREF_CPO03TRANSACTION
_BLOCKED_BY_PAYEE
1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e = _TRANSACTION_BLOCKED_BY_PAYEEA Paypal Reference Deposit payment is created and is in the state "RefusedByProvider".

ProviderResponseMessage = TRANSACTION
_BLOCKED_BY_PAYEE
is returned in the response
REF_PPREF_CPO04TRANSACTION
_LIMIT_EXCEEDED
1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e = _TRANSACTION_LIMIT_EXCEEDEDA Paypal Reference Deposit payment is created and is in the state "RefusedByProvider".

ProviderResponseMessage = TRANSACTION
_LIMIT_EXCEEDED
is returned in the response
REF_PPREF_CPO05TRANSACTION
_REFUSED
1. Create a PayPal Reference Deposit (393) by sending a initiatePayment request with a specific payment data ForcedProviderRespons_e = _TRANSACTION_REFUSEDA Paypal Reference Deposit payment is created and is in the state "RefusedByProvider".

ProviderResponseMessage = TRANSACTION
_REFUSED
is returned in the response

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 Deposit WITH automatic capturing:

📘

Pre-condition: Automatic capturing is enabled for the merchant

#Test Case NameSteps to ExecuteExpected Outcome
SUCC_PPRED01SUCCESSFUL PayPal Redirect Deposit1. Create a PayPal Redirect Deposit (394) by sending a initiatePayment request with
the following specific payment data in addition:
- SuccessPageUrl
- CancelPageUrl

2. Redirect your customer to PayPal by using the _RedirectionUrl _returned in the initiatePayment response

3. Customer logs into PayPal page and approves the order
1. A Paypal Redirect Deposit payment is created and is in the state " RedirectURLCreated".
A _RedirectionUrl _is returned in the initiatePayment response

2. Customer is redirected to PayPal Login page

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.
(automatic capturing)

4. Customer is redirected to a success page specified in the initiatePayment request

5. The Paypal Redirect Deposit payment is in the state "DepositedByProvider".

PayPal Reference Deposit WITHOUT automatic capturing:

📘

Pre-condition: Automatic capturing is disabled for the merchant

#Test Case NameSteps to ExecuteExpected Outcome
SUCC_PPRED02SUCCESSFUL PayPal Redirect Deposit1. Create a PayPal Redirect Deposit (394) by sending a initiatePayment request with
the following specific payment data in addition:
- SuccessPageUrl
- CancelPageUrl

2. Redirect your customer to PayPal by using the _RedirectionUrl _returned in the initiatePayment response

3. Customer logs into PayPal page and approves the order

4. Merchant can capture the created PayPal Redirect Deposit payment by sending the executePaymentAction request with the actionID = 2 (Capture Payment)
1. A Paypal Redirect Deposit payment is created and is in the state " RedirectURLCreated".
A _RedirectionUrl _is returned in the initiatePayment response

2. Customer is redirected to PayPal Login page

3. 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".

4. Merchant is notified by PaymentService as soon as the order has been captured successfully by PayPal

5. Customer is redirected to a success page specified in the initiatePayment request

6. The Paypal Redirect Deposit payment is in the state "DepositedByProvider".

PENDING cases:

#Test Case NameSteps to ExecuteExpected Outcome
PEND_PPRED01PENDING PayPal Redirect Deposit
(with automatic capturing enabled)
1. Create a PayPal Redirect Deposit (394) by sending a initiatePayment request with a specific payment data
- SuccessPageUrl
- CancelPageUrl
- ForcedProviderRespons_e = _PENDING

2. Redirect your customer to PayPal by using the _RedirectionUrl _returned in the initiatePayment response

3. Customer logs into PayPal page and approves the order
1. A Paypal Redirect Deposit payment is created and is in the state " RedirectURLCreated".
A _RedirectionUrl _is returned in the initiatePayment response

2. Customer is redirected to PayPal Login page

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.
(automatic capturing)

4. Customer is redirected to a pending page ???

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 NameSteps to ExecuteExpected 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 NameSteps to ExecuteExpected Outcome
ERR_PPRED_CPOxx<Expected ForcedProviderResponse>1. Create a PayPal Redirect Deposit (394) by sending a initiatePayment request with a specific payment data ForcedProviderResponse = <Expected ForcedProviderResponse>

2. Redirect your customer to PayPal by using the _RedirectionUrl _returned in the initiatePayment response

3. Customer logs into PayPal page and approves the order
1. A Paypal Redirect Deposit payment is created and is in the state " RedirectURLCreated".
A _RedirectionUrl _is returned in the initiatePayment response

2. Customer is redirected to PayPal Login page

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.
(automatic capturing)

4. Customer is redirected to a error page

5. The Paypal Redirect Deposit payment is in the state "DepositErrorReportedByProvider".

ProviderResponseMessage = <Expected ForcedProviderResponse> is sent in the payment state notification.
REFUSAL
_PPRED_CPOxx
<Expected ForcedProviderResponse>1. Create a PayPal Redirect Deposit (394) by sending a initiatePayment request with a specific payment data ForcedProviderResponse = <Expected ForcedProviderResponse>

2. Redirect your customer to PayPal by using the _RedirectionUrl _returned in the initiatePayment response

3. Customer logs into PayPal page and approves the order
1. A Paypal Redirect Deposit payment is created and is in the state " RedirectURLCreated".
A _RedirectionUrl _is returned in the initiatePayment response

2. Customer is redirected to PayPal Login page

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.
(automatic capturing)

4. Customer is redirected to a error page

5. The Paypal Redirect Deposit payment is in the state "RefusedByProvider".

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 NameSteps to ExecuteExpected Outcome
SUCC_PPREFPre01SUCCESSFUL PayPal Reference PreAuthorisation1. Specify the shopping cart with all required data

2. Provide shipping information

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 NameSteps to ExecuteExpected Outcome
PEND_PPREFPre01PENDING PayPal Reference PreAuthorisation1. Specify the shopping cart with all required data

2. Provide shipping information

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

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 NameSteps to ExecuteExpected Outcome
ERR_PPREFPre01INVALID_CURRENCY_CODE1. Specify the shopping cart with all required data

2. Provide shipping information

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

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_PPREFPre02INVALID_COUNTRY_CODE1. Specify the shopping cart with all required data

2. Provide shipping information

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

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 NameSteps to ExecuteExpected Outcome
ERR_PPREFPre03PAYER_ACCOUNT
_LOCKED_OR_CLOSED
1. Specify the shopping cart with all required data

2. Provide shipping information

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

In addition includes also a specific payment data ForcedProviderRespons_e = _PAYER_ACCOUNT
_LOCKED_OR_CLOSED
in the initiatePayment request
A Paypal Reference PreAuthorisation payment is created and is in the state "ExecuteErrorReportedByProvider".

ProviderResponseMessage = PAYER_ACCOUNT
_LOCKED_OR_CLOSED
is returned in the response
ERR_PPREFPre04PAYER_ACCOUNT
_RESTRICTED
1. Specify the shopping cart with all required data

2. Provide shipping information

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

In addition includes also a specific payment data ForcedProviderRespons_e = _PAYER_ACCOUNT
_RESTRICTED
in the initiatePayment request
A Paypal Reference PreAuthorisation payment is created and is in the state "ExecuteErrorReportedByProvider".

ProviderResponseMessage = PAYER_ACCOUNT
_RESTRICTED
is returned in the response
ERR_PPREFPre05PAYER_CANNOT_PAY1. Specify the shopping cart with all required data

2. Provide shipping information

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

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_PPREFPre06BILLING_AGREEMENT
_NOT_FOUND
1. Specify the shopping cart with all required data

2. Provide shipping information

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

In addition includes also a specific payment data ForcedProviderRespons_e = _BILLING_AGREEMENT
_NOT_FOUND
in the initiatePayment request
A Paypal Reference PreAuthorisation payment is created and is in the state "ExecuteErrorReportedByProvider".

ProviderResponseMessage = BILLING_AGREEMENT
_NOT_FOUND
is returned in the response
ERR_PPREFPre07AGREEMENT_
ALREADY_CANCELLED
1. Specify the shopping cart with all required data

2. Provide shipping information

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

In addition includes also a specific payment data ForcedProviderRespons_e = _AGREEMENT
ALREADYCANCELLED in the initiatePayment request
A Paypal Reference PreAuthorisation payment is created and is in the state "ExecuteErrorReportedByProvider".

ProviderResponseMessage = AGREEMENT
ALREADYCANCELLED is returned in the response
ERR_PPREFPre08DENIED1. Specify the shopping cart with all required data

2. Provide shipping information

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

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 NameSteps to ExecuteExpected Outcome
SUCC_PPREDPre01SUCCESSFUL PayPal Redirect PreAuthorisation1. Specify the shopping cart with all required data

2. Provide shipping information

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:
- SuccessPageUrl
- CancelPageUrl

2. Redirect your customer to PayPal by using the _RedirectionUrl _returned in the initiatePayment response

3. Customer logs into PayPal page and approves the order
1. A Paypal Redirect PreAuthorisation payment is created and is in the state " RedirectURLCreated".
A _RedirectionUrl _is returned in the initiatePayment response

2. Customer is redirected to PayPal Login page and approves the payment.

3. Merchant sends a handleProviderNotificationToMerchantRequest containing the data of the payment to PaymentService

4. PaymentService queries the order details including the payer (Customer) details and related details on PayPal

5. Automatic authorization will be triggered after successful query

6. The Paypal Redirect PreAuthorisation payment is in the state "ExecutedByProvider".

PENDING cases:

#Test Case NameSteps to ExecuteExpected Outcome
PEND_PPREDPre01PENDING PayPal Redirect PreAuthorisation1. Specify the shopping cart with all required data

2. Provide shipping information

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:
- SuccessPageUrl
- CancelPageUrl
- ForcedProviderRespons_e = _PENDING

2. Redirect your customer to PayPal by using the _RedirectionUrl _returned in the initiatePayment response

3. Customer logs into PayPal page and approves the order
1. A Paypal Redirect PreAuthorisation payment is created and is in the state " RedirectURLCreated".
A _RedirectionUrl _is returned in the initiatePayment response

2. Customer is redirected to PayPal Login page and approves the payment.

3. Merchant sends a handleProviderNotificationToMerchantRequest containing the data of the payment to PaymentService

4. PaymentService queries the order details including the payer (Customer) details and related details on PayPal

5. Automatic authorization will be triggered after successful query

6. The Paypal Redirect PreAuthorisation payment is in the state "PendingOnProvider".

ProviderResponseMessage = PENDING is returned in the response

ERROR cases:

Error occurs during the "create order" phase:

#Test Case NameSteps to ExecuteExpected Outcome
ERR_PPREDPre01INVALID_CURRENCY_CODE1. Specify the shopping cart with all required data

2. Provide shipping information

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:
- SuccessPageUrl
- CancelPageUrl
- ForcedProviderRespons_e = _INVALID_CURRENCY_CODE
1. A Paypal Redirect PreAuthorisation payment is created and is in the state " InitiateErrorReportedByProvider".

ProviderResponseMessage = INVALID_CURRENCY_CODE is returned in the response
ERR_PPREDPre02INVALID_COUNTRY_CODE1. Specify the shopping cart with all required data

2. Provide shipping information

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:
- SuccessPageUrl
- CancelPageUrl
- ForcedProviderRespons_e = _INVALID_COUNTRY_CODE
1. A Paypal Redirect 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 NameSteps to ExecuteExpected Outcome
ERR_PPREDPre03PAYER_ACCOUNT
_LOCKED_OR_CLOSED
1. Specify the shopping cart with all required data

2. Provide shipping information

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:
- SuccessPageUrl
- CancelPageUrl
- ForcedProviderRespons_e = _PAYER_ACCOUNT
_LOCKED_OR_CLOSED


2. Redirect your customer to PayPal by using the _RedirectionUrl _returned in the initiatePayment response

3. Customer logs into PayPal page and approves the order
1. A Paypal Redirect PreAuthorisation payment is created and is in the state " RedirectURLCreated".
A _RedirectionUrl _is returned in the initiatePayment response

2. Customer is redirected to PayPal Login page and approves the payment.

3. Merchant sends a handleProviderNotificationToMerchantRequest containing the data of the payment to PaymentService

4. PaymentService queries the order details including the payer (Customer) details and related details on PayPal

5. Automatic authorization will be triggered after successful query

6. The Paypal Redirect PreAuthorisation payment is in the state "ExecuteErrorReportedByProvider".

ProviderResponseMessage = PAYER_ACCOUNT
_LOCKED_OR_CLOSED
is returned in the response
ERR_PPREDPre04PAYER_ACCOUNT
_RESTRICTED
1. Specify the shopping cart with all required data

2. Provide shipping information

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:
- SuccessPageUrl
- CancelPageUrl
- ForcedProviderRespons_e = _PAYER_ACCOUNT
_RESTRICTED


2. Redirect your customer to PayPal by using the _RedirectionUrl _returned in the initiatePayment response

3. Customer logs into PayPal page and approves the order
1. A Paypal Redirect PreAuthorisation payment is created and is in the state " RedirectURLCreated".
A _RedirectionUrl _is returned in the initiatePayment response

2. Customer is redirected to PayPal Login page and approves the payment.

3. Merchant sends a handleProviderNotificationToMerchantRequest containing the data of the payment to PaymentService

4. PaymentService queries the order details including the payer (Customer) details and related details on PayPal

5. Automatic authorization will be triggered after successful query

6. The Paypal Redirect PreAuthorisation payment is in the state "ExecuteErrorReportedByProvider".

ProviderResponseMessage = PAYER_ACCOUNT
_RESTRICTED
is returned in the response
ERR_PPREDPre05PAYER_CANNOT_PAY1. Specify the shopping cart with all required data

2. Provide shipping information

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:
- SuccessPageUrl
- CancelPageUrl
- ForcedProviderRespons_e = _PAYER_CANNOT_PAY

2. Redirect your customer to PayPal by using the _RedirectionUrl _returned in the initiatePayment response

3. Customer logs into PayPal page and approves the order
1. A Paypal Redirect PreAuthorisation payment is created and is in the state " RedirectURLCreated".
A _RedirectionUrl _is returned in the initiatePayment response

2. Customer is redirected to PayPal Login page and approves the payment.

3. Merchant sends a handleProviderNotificationToMerchantRequest containing the data of the payment to PaymentService

4. PaymentService queries the order details including the payer (Customer) details and related details on PayPal

5. Automatic authorization will be triggered after successful query

6. The Paypal Redirect PreAuthorisation payment is in the state "ExecuteErrorReportedByProvider".

ProviderResponseMessage = PAYER_CANNOT_PAY is returned in the response
ERR_PPREDPre06DENIED1. Specify the shopping cart with all required data

2. Provide shipping information

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:
- SuccessPageUrl
- CancelPageUrl
- ForcedProviderRespons_e = _DENIED

2. Redirect your customer to PayPal by using the _RedirectionUrl _returned in the initiatePayment response

3. Customer logs into PayPal page and approves the order
1. A Paypal Redirect PreAuthorisation payment is created and is in the state " RedirectURLCreated".
A _RedirectionUrl _is returned in the initiatePayment response

2. Customer is redirected to PayPal Login page and approves the payment.

3. Merchant sends a handleProviderNotificationToMerchantRequest containing the data of the payment to PaymentService

4. PaymentService queries the order details including the payer (Customer) details and related details on PayPal

5. Automatic authorization will be triggered after successful query

6. The Paypal Redirect PreAuthorisation payment is in the state "RefusedByProvider".

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 Capture WITH automatic capturing:

📘

Pre-condition: Automatic capturing is enabled for the merchant

#Test Case NameSteps to ExecuteExpected Outcome
SUCC_PPCAP01SUCCESSFUL PayPal CapturePrecondition:
1. A successful
PayPal Redirect PreAuthorisation
or a [successful PayPal Reference PreAuthorisation] (https://developer.kalixa.com/docs/paypal-test-cases#span-stylecolordodgerbluesuccess-casesspan-2) is created and is in the state "ExecutedByProvider".

2. Create a PayPal Capture (410) by sending an initiatePaymentFromReference request with
the following specific payment data in addition:

- PaymentDescription (optional)
- UserStatementText (optional)
A Paypal Capture payment is created and is in the state "CapturedByProvider".

PENDING cases:

#Test Case NameSteps to ExecuteExpected Outcome
PEND_PPCAP01PENDING PayPal CapturePrecondition:
1. A successful
PayPal Redirect PreAuthorisation
or a [successful PayPal Reference PreAuthorisation] (https://developer.kalixa.com/docs/paypal-test-cases#span-stylecolordodgerbluesuccess-casesspan-2) is created and is in the state "ExecutedByProvider".

2. Create a PayPal Capture (410) by sending an initiatePaymentFromReference request with
the following specific payment data in addition:

- ForcedProviderRespons_e = _PENDING
- PaymentDescription (optional)
- UserStatementText (optional)
A Paypal Capture payment is created and is in the state "PendingOnProvider".

ProviderResponseMessage = PENDING is returned in the response

ERROR cases:

#Test Case NameSteps to ExecuteExpected Outcome
ERR_PPCAP01PAYER_ACCOUNT
_LOCKED_OR_CLOSED
Precondition:
1. A successful
PayPal Redirect PreAuthorisation
or a [successful PayPal Reference PreAuthorisation] (https://developer.kalixa.com/docs/paypal-test-cases#span-stylecolordodgerbluesuccess-casesspan-2) is created and is in the state "ExecutedByProvider".

2. Create a PayPal Capture (410) by sending an initiatePaymentFromReference request with
the following specific payment data in addition:

- ForcedProviderRespons_e = _PAYER_ACCOUNT
_LOCKED_OR_CLOSED

- PaymentDescription (optional)
- UserStatementText (optional)
A Paypal Capture payment is created and is in the state "CaptureErrorReportedByProvider".

ProviderResponseMessage = PAYER_ACCOUNT
_LOCKED_OR_CLOSED
is returned in the response
ERR_PPCAP02PAYER_CANNOT_PAYPrecondition:
1. A successful
PayPal Redirect PreAuthorisation
or a [successful PayPal Reference PreAuthorisation] (https://developer.kalixa.com/docs/paypal-test-cases#span-stylecolordodgerbluesuccess-casesspan-2) is created and is in the state "ExecutedByProvider".

2. Create a PayPal Capture (410) by sending an initiatePaymentFromReference request with
the following specific payment data in addition:

- ForcedProviderRespons_e = _PAYER_CANNOT_PAY
- PaymentDescription (optional)
- UserStatementText (optional)
A Paypal Capture payment is created and is in the state "CaptureErrorReportedByProvider".

ProviderResponseMessage = PAYER_CANNOT_PAY is returned in the response
ERR_PPCAP03TRANSACTION_REFUSEDPrecondition:
1. A successful
PayPal Redirect PreAuthorisation
or a [successful PayPal Reference PreAuthorisation] (https://developer.kalixa.com/docs/paypal-test-cases#span-stylecolordodgerbluesuccess-casesspan-2) is created and is in the state "ExecutedByProvider".

2. Create a PayPal Capture (410) by sending an initiatePaymentFromReference request with
the following specific payment data in addition:

- ForcedProviderRespons_e = _TRANSACTION_REFUSED
- PaymentDescription (optional)
- UserStatementText (optional)
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

Refund created from a PayPal Reference/Redirect Deposit

SUCCESS cases:

#Test Case NameSteps to ExecuteExpected Outcome
SUCC_PPR01SUCCESSFUL PayPal Refund
(Full refund)
1. Create a successful PayPal Reference Deposit (393) by sending a initiatePayment request with the following data:
- Amount = 15.00
- Currency = EUR

2. Create a PayPal Refund (400) by sending a _initiatePaymentFromRefe_rence request with the following data:
- Amount = 15.00
- Currency = EUR
- OriginalPaymentID = UniqueID of the payment created in step 1
A Paypal Refund payment is created and is in the state "Refunded".
SUCC_PPR02SUCCESSFUL PayPal Refund
(Partial refund)
1. Create a successful PayPal Reference Deposit (393) by sending a initiatePayment request with the following data:
- Amount = 15.00
- Currency = EUR

2. Create a successful PayPal Refund (400) by sending a _initiatePaymentFromRefe_rence request with the following data:
- Amount = 11.50
- Currency = EUR
- OriginalPaymentID = UniqueID of the payment created in step 1

3. Create a PayPal Refund (400) by sending a _initiatePaymentFromRefe_rence request with the following data:
- Amount = 3.50
- Currency = EUR
- OriginalPaymentID = UniqueID of the payment created in step 1
A Paypal Refund payment is created and is in the state "Refunded".

PENDING cases:

#Test Case NameSteps to ExecuteExpected Outcome
PEND_PPR01PENDING PayPal Refund1. Create a successful PayPal Reference Deposit (393) by sending a initiatePayment request with the following data:
- Amount = 15.00
- Currency = EUR

2. Create a PayPal Refund (400) by sending a _initiatePaymentFromRefe_rence request with the following data:
- Amount = 15.00
- Currency = EUR
- OriginalPaymentID = UniqueID of the payment created in step 1
- ForcedProviderRespons = PENDING
A Paypal Refund payment is created and is in the state "PendingOnProvider".

ERROR cases:

#Test Case NameSteps to ExecuteExpected Outcome
ERR_PPR01UNSUCCESSFUL PayPal Refund
if original payment is not in successfully captured state
1. Create a unsuccessful PayPal Reference Deposit (393) by sending a initiatePayment request with the following data:
- Amount = 15.00
- Currency = EUR
- ForcedProviderRespons = BILLING_AGREEMENT_NOT_FOUND
(Payment is in the state _DepositErrorReportedByProvider)

2. Create a _PayPal Refund
(400) by sending a _initiatePaymentFromRefe_rence request with the following data:
- Amount = 15.00
- Currency = EUR
- OriginalPaymentID = UniqueID of the payment created in step 1
No Paypal Refund payment is created

The following error is returned:
ErrorCode = 1002
ErrorMessage = "Refund amount exceeded! Deposit amount = 0.0000; Refunded amount = 0; Max refundable amount = 0;Refund amount = 15.00"

.
ERR_PPR02UNSUCCESSFUL PayPal Refund
if refund amount exceeded
(Full refund)
1. Create a successful PayPal Reference Deposit (393) by sending a initiatePayment request with the following data:
- Amount = 15.00
- Currency = EUR

2. Create a PayPal Refund (400) by sending a _initiatePaymentFromRefe_rence request with the following data:
- Amount = 15.01
- Currency = EUR
- OriginalPaymentID = UniqueID of the payment created in step 1
No Paypal Refund payment is created

The following error is returned:
The following error is returned:
ErrorCode = 1002
ErrorMessage = "Refund amount exceeded! Deposit amount = 15.0000; Refunded amount = 0; Max refundable amount = 0;Refund amount = 15.01"
ERR_PPR03UNSUCCESSFUL PayPal Refund
if refund amount exceeded
(Partial refund)
1. Create a successful PayPal Reference Deposit (393) by sending a initiatePayment request with the following data:
- Amount = 15.00
- Currency = EUR

2. Create a successful PayPal Refund (400) by sending a _initiatePaymentFromRefe_rence request with the following data:
- Amount = 11.00
- Currency = EUR
- OriginalPaymentID = UniqueID of the payment created in step 1

2. Create a PayPal Refund (400) by sending a _initiatePaymentFromRefe_rence request with the following data:
- Amount = 5.00
- Currency = EUR
- OriginalPaymentID = UniqueID of the payment created in step 1
No Paypal Refund payment is created

The following error is returned:
ErrorCode = 1002
ErrorMessage = "Refund amount exceeded! Deposit amount = 15.0000; Refunded amount = 11.0000; Max refundable amount = 4.0000;Refund amount = 5.00"
ERR_PPR04UNSUCCESSFUL PayPal Refund
if refund currency does not matched
1. Create a successful PayPal Reference Deposit (393) by sending a initiatePayment request with the following data:
- Amount = 15.00
- Currency = EUR

2. Create a PayPal Refund (400) by sending a _initiatePaymentFromRefe_rence request with the following data:
- Amount = 5.00
- Currency = GBP
- OriginalPaymentID = UniqueID of the payment created in step 1
No Paypal Refund payment is created

The following error is returned:
ErrorCode = 309
ErrorMessage = "Currencies do not match! Currency of amount = EUR, but expected currency = GBP"
ERR_PPR05INTERNAL_SERVER_ERROR1. Create a successful PayPal Reference Deposit (393) by sending a initiatePayment request with the following data:
- Amount = 15.00
- Currency = EUR

2. Create a PayPal Refund (400) by sending a _initiatePaymentFromRefe_rence request with the following data:
- Amount = 15.00
- Currency = EUR
- OriginalPaymentID = UniqueID of the payment created in step 1
- ForcedProviderResponse = INTERNAL_SERVER_ERROR
A Paypal Refund payment is created and is in the state "RefundRefusedByProvider".
ERR_PPR06INVALID_RESOURCE_ID1. Create a successful PayPal Reference Deposit (393) by sending a initiatePayment request with the following data:
- Amount = 15.00
- Currency = EUR

2. Create a PayPal Refund (400) by sending a _initiatePaymentFromRefe_rence request with the following data:
- Amount = 15.00
- Currency = EUR
- OriginalPaymentID = UniqueID of the payment created in step 1
- ForcedProviderResponse = INVALID_RESOURCE_ID
A Paypal Refund payment is created and is in the state "RefundRefusedByProvider".

Refund created from a PayPal Capture

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 NameSteps to ExecuteExpected Outcome
SUCC_PPC01SUCCESSFUL full PayPal Cancellation of a PayPal Preauthorisation1. Create a successful PayPal Reference Preauthorisation (396) or PayPal Redirect Preauthorisation (395) by sending a initiatePayment request or a getRedirectData request with the following data:
- Amount = 50.00
- Currency = EUR

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_PPC02SUCCESSFUL partial PayPal Cancellation of a PayPal Preauthorisation which has a partial successful PayPal Capture payment1. Create a successful PayPal Reference Preauthorisation (396) or PayPal Redirect Preauthorisation (395) by sending a initiatePayment request or a getRedirectData request with the following data:
- Amount = 50.00
- Currency = EUR

The Preauthorisation payment should be in the state "ExecutedByProvider"

2. Create a successful PayPal Capture by sending a initiatePaymentFromReferenceRequest request with the following data:
- Amount = 30.00
- Currency = EUR

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_PPC03SUCCESSFUL full PayPal Cancellation of a PayPal Preauthorisation which has a partial unsuccessful PayPal Capture payment1. Create a successful PayPal Reference Preauthorisation (396) or PayPal Redirect Preauthorisation (395) by sending a initiatePayment request or a getRedirectData request with the following data:
- Amount = 50.00
- Currency = EUR

2. Create an unsuccessful PayPal Capture by sending a initiatePaymentFromReferenceRequest request with the following data:
- Amount = 30.00
- Currency = EUR

The Capture payment is in one of the following states:
- CaptureRefused
- CaptureErrorReportedByProvider
_- CaptureCommunicationErrorOccurred

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 NameSteps to ExecuteExpected Outcome
ERR_PPC01UNSUCCESSFUL PayPal Cancellation
if original payment is not in successfully executed state
1. Create an unsuccessful PayPal Reference Preauthorisation (396) or PayPal Redirect Preauthorisation (395) by sending a initiatePayment request or a getRedirectData request with the following data:
- Amount = 50.00
- Currency = EUR

The Preauthorization payment could be in one of the following states:
- RedirectURLCreated
- InitiateRequestProvider
CommunicationErrorOccurred
- InitiateErrorReportedByProvider
- ExecuteErrorReportedByProvider
- ExecuteRequestSentToProvider
CommunicationErrorOccure
- RefusedByProvider
- TokenExpired
- PendingOnProvider

2. Create a PayPal Cancellation (429) by sending the executePaymentAction request with the actionID = 1 (Cancel)
A Paypal Cancellation payment is not created.
An error code 700 with a error message "The action is not allowed for the payment." is returned in the "cancel" action response.
ERR_PPC02CANNOT_BE_VOIDED1. Create a successful PayPal Reference Preauthorisation (396) or PayPal Redirect Preauthorisation (395) by sending a initiatePayment request or a getRedirectData request with the following data:
- Amount = 50.00
- Currency = EUR

2. Create a PayPal Cancellation (429) by sending the executePaymentAction request with the actionID = 1 (Cancel) with the following additional data:

- ForcedProviderResponse = CANNOT_BE_VOIDED
A Paypal Cancellation payment with an amount of 50 EUR is created and is in the state "CancelRefusedByProvider".
ERR_PPC03PREVIOUSLY_CAPTURED1. Create a successful PayPal Reference Preauthorisation (396) or PayPal Redirect Preauthorisation (395) by sending a initiatePayment request or a getRedirectData request with the following data:
- Amount = 50.00
- Currency = EUR

2. Create a PayPal Cancellation (429) by sending the executePaymentAction request with the actionID = 1 (Cancel) with the following additional data:

- ForcedProviderResponse = PREVIOUSLY_CAPTURED
A Paypal Cancellation payment with an amount of 50 EUR is created and is in the state "CancelRefusedByProvider".
ERR_PPC04PREVIOUSLY_VOIDED1. Create a successful PayPal Reference Preauthorisation (396) or PayPal Redirect Preauthorisation (395) by sending a initiatePayment request or a getRedirectData request with the following data:
- Amount = 50.00
- Currency = EUR

2. Create a PayPal Cancellation (429) by sending the executePaymentAction request with the actionID = 1 (Cancel) with the following additional data:

- 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 NameExpected Outcome
ERR_PPC02UNSUCCESSFUL PayPal Cancellation
if provider refuses the cancellation request (e.g.
CANNOT_BE_VOIDED, PREVIOUSLY_CAPTURED, PREVIOUSLY_VOIDED)
A Paypal Cancellation payment is created and is in the state "CancelRefusedByProvider".

PayPal Cancellation via Payment Service Admin

SUCCESS cases:

#Test Case NameSteps to ExecuteExpected Outcome
SUCC_PSA_PPC01SUCCESSFUL full PayPal Cancellation of a PayPal Preauthorisation1. Open the payment details page of a successful
PayPal Redirect PreAuthorisation
or a [successful PayPal Reference PreAuthorisation] (https://developer.kalixa.com/docs/paypal-test-cases#span-stylecolordodgerbluesuccess-casesspan-2) which has an amount of 50 EUR and is in the state "ExecutedByProvider".

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_PPC2SUCCESSFUL partial PayPal Cancellation of a PayPal Preauthorisation which has a successful partial PayPal Capture1. Open the payment details page of a successful
PayPal Redirect PreAuthorisation
or a [successful PayPal Reference PreAuthorisation] (https://developer.kalixa.com/docs/paypal-test-cases#span-stylecolordodgerbluesuccess-casesspan-2) which has an amount of 50 EUR and is in the state "ExecutedByProvider".
And this PayPal Preauthorisation payment has a PayPal Capture payment with an amount of 30 EUR and is in state "CapturedByProvider"

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:

1152

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:

FieldValue
ForcedProviderResponseFor PayPal Reference Deposit: see the related PayPal API documentation or tables below
For PayPal Refund: 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" fieldDescriptionExpected payment state
INTERNAL_SERVER_ERRORAn internal server error has occurred.ExecuteErrorReportedByProvider
INVALID_COUNTRY_CODECountry code is invalid.ExecuteErrorReportedByProvider
INVALID_CURRENCY_CODECurrency code is invalid or is not currently supported.ExecuteErrorReportedByProvider

Error occurs during the "capture payment for order" phase:

Value for the
"ForcedProviderResponse" field
DescriptionExpected payment state
AGREEMENT_ALREADY_CANCELLEDThe requested agreement is already cancelled.DepositErrorReportedByProvider
BILLING_AGREEMENT_NOT_FOUNDThe requested Billing Agreement token was not found.DepositErrorReportedByProvider
COMPLIANCE_VIOLATIONTransaction cannot be processed due to a possible compliance violation.DepositErrorReportedByProvider
INSTRUMENT_DECLINEDThe funding instrument presented was either declined by the processor or bank.RefusedByProvider
INVALID_RESOURCE_IDSpecified resource ID does not exist.DepositErrorReportedByProvider
PAYEE_BLOCKED_TRANSACTIONThe fraud settings for this seller are such that this payment cannot be executed.RefusedByProvider
PAYER_ACCOUNT_LOCKED_OR_CLOSEDPayer account is locked or closed.DepositErrorReportedByProvider
PAYER_ACCOUNT_RESTRICTEDPayer account is restricted.DepositErrorReportedByProvider
PAYER_CANNOT_PAYPayer cannot pay for this transaction.DepositErrorReportedByProvider
TRANSACTION_BLOCKED_BY_PAYEEThe requested action could not be performed, semantically incorrect, or failed business validation.RefusedByProvider
TRANSACTION_LIMIT_EXCEEDEDTotal payment amount exceeded transaction limit.RefusedByProvider
TRANSACTION_REFUSEDThe transaction was refused.RefusedByProvider

List of reproducible errors (PayPal Refund)

Value for the "ForcedProviderResponse" fieldDescriptionExpected payment state
INTERNAL_SERVER_ERRORAn internal server error has occurred.RefundRefusedByProvider
INVALID_RESOURCE_IDSpecified resource ID does not exist. Please check the resource ID and try again.RefundRefusedByProvider

List of reproducible errors (PayPal Cancellation)

Value for the "ForcedProviderResponse" fieldDescriptionExpected payment state
CANNOT_BE_VOIDEDA reauthorization cannot be voided. Please void the original parent authorization.CancelRefusedByProvider
PREVIOUSLY_CAPTUREDAuthorization has been previously captured and hence cannot be voided.CancelRefusedByProvider
PREVIOUSLY_VOIDEDAuthorization has been previously voided and hence cannot be voided again.CancelRefusedByProvider