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 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 Deposit WITHOUT 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 | 1. 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 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". |
ERR_PPREF_CO02 | 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 _VIOLATION | 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 _RESOURCE_ID | 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 _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_CPO04 | PAYER_ACCOUNT _RESTRICTED | 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 _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 "DepositErrorReportedByProvider". ProviderResponseMessage = INTERNAL_SERVER_ERROR is returned in the response |
ERR_PPREF_CPO07 | BILLING_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_FOUND | A Paypal Reference Deposit payment is created and is in the state "DepositErrorReportedByProvider". ProviderResponseMessage = BILLING_AGREEMENT _NOT_FOUND is returned in the response |
ERR_PPREF_CPO08 | AGREEMENT_ALREADY _CANCELLED | 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 _CANCELLED is returned in the response |
REF_PPREF_CPO01 | INSTRUMENT _DECLINED | 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 _TRANSACTION | 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 _TRANSACTION is returned in the response |
REF_PPREF_CPO03 | TRANSACTION _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_PAYEE | A Paypal Reference Deposit payment is created and is in the state "RefusedByProvider". ProviderResponseMessage = TRANSACTION _BLOCKED_BY_PAYEE is returned in the response |
REF_PPREF_CPO04 | TRANSACTION _LIMIT_EXCEEDED | 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 _LIMIT_EXCEEDED is returned in the response |
REF_PPREF_CPO05 | TRANSACTION _REFUSED | 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 _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 Name | Steps to Execute | Expected Outcome |
---|---|---|---|
SUCC_PPRED01 | SUCCESSFUL PayPal Redirect Deposit | 1. 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 Name | Steps to Execute | Expected Outcome |
---|---|---|---|
SUCC_PPRED02 | SUCCESSFUL PayPal Redirect Deposit | 1. 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 Name | Steps to Execute | Expected Outcome |
---|---|---|---|
PEND_PPRED01 | PENDING 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 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> | 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 Name | Steps to Execute | Expected Outcome |
---|---|---|---|
SUCC_PPREFPre01 | SUCCESSFUL PayPal Reference PreAuthorisation | 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 | 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 | 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 = _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 | 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 = _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 | 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 = _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 _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_PPREFPre04 | PAYER_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_PPREFPre05 | PAYER_CANNOT_PAY | 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_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 _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_PPREFPre07 | AGREEMENT_ 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_PPREFPre08 | DENIED | 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 = _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 | 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 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 Name | Steps to Execute | Expected Outcome |
---|---|---|---|
PEND_PPREDPre01 | PENDING PayPal Redirect PreAuthorisation | 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 = _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 Name | Steps to Execute | Expected Outcome |
---|---|---|---|
ERR_PPREDPre01 | INVALID_CURRENCY_CODE | 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 = _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_PPREDPre02 | INVALID_COUNTRY_CODE | 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 = _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 Name | Steps to Execute | Expected Outcome |
---|---|---|---|
ERR_PPREDPre03 | PAYER_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_PPREDPre04 | PAYER_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_PPREDPre05 | PAYER_CANNOT_PAY | 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_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_PPREDPre06 | DENIED | 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 = _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 Name | Steps to Execute | Expected Outcome |
---|---|---|---|
SUCC_PPCAP01 | SUCCESSFUL PayPal Capture | 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: - PaymentDescription (optional) - UserStatementText (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: 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 Name | Steps to Execute | Expected Outcome |
---|---|---|---|
ERR_PPCAP01 | PAYER_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_PPCAP02 | PAYER_CANNOT_PAY | 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_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_PPCAP03 | TRANSACTION_REFUSED | 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 = _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 Name | Steps to Execute | Expected Outcome |
---|---|---|---|
SUCC_PPR01 | SUCCESSFUL 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_PPR02 | SUCCESSFUL 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 Name | Steps to Execute | Expected Outcome |
---|---|---|---|
PEND_PPR01 | PENDING PayPal 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 - ForcedProviderRespons = PENDING | 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 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_PPR02 | UNSUCCESSFUL 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_PPR03 | UNSUCCESSFUL 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_PPR04 | UNSUCCESSFUL 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_PPR05 | INTERNAL_SERVER_ERROR | 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 - ForcedProviderResponse = INTERNAL_SERVER_ERROR | A Paypal Refund payment is created and is in the state "RefundRefusedByProvider". |
ERR_PPR06 | INVALID_RESOURCE_ID | 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 - 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 Name | Steps to Execute | Expected Outcome |
---|---|---|---|
SUCC_PPC01 | SUCCESSFUL full PayPal Cancellation of a PayPal Preauthorisation | 1. 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_PPC02 | SUCCESSFUL partial PayPal Cancellation of a PayPal Preauthorisation which has a partial successful PayPal Capture payment | 1. 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_PPC03 | SUCCESSFUL full PayPal Cancellation of a PayPal Preauthorisation which has a partial unsuccessful PayPal Capture payment | 1. 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 Name | Steps to Execute | Expected Outcome |
---|---|---|---|
ERR_PPC01 | UNSUCCESSFUL 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_PPC02 | CANNOT_BE_VOIDED | 1. 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_PPC03 | PREVIOUSLY_CAPTURED | 1. 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_PPC04 | PREVIOUSLY_VOIDED | 1. 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 Name | Expected Outcome |
---|---|---|
ERR_PPC02 | UNSUCCESSFUL 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 Name | Steps to Execute | Expected Outcome |
---|---|---|---|
SUCC_PSA_PPC01 | SUCCESSFUL full PayPal Cancellation of a PayPal Preauthorisation | 1. 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_PPC2 | SUCCESSFUL partial PayPal Cancellation of a PayPal Preauthorisation which has a successful partial PayPal Capture | 1. 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:
![Untitled.jpg 1152](https://files.readme.io/b6c4dbc-Untitled.jpg)
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 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" 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 5 months ago