Platforms: Legacy eCommerce, KCCP eCommerce and eCommerce+OMS App Documentation |
The PayPal Express Application by Kibo eCommerce leverages the API Extension framework to communicate with PayPal using the PayPal Name-Value Pair API. You can leverage features from both Kibo eCommerce and PayPal to test the functionality of the app before publishing it to your live site(s).
PayPal Operations
The PayPal Express Application sends the following API requests to PayPal, as needed:
- SetExpressCheckout
- GetExpressCheckoutDetails
- DoExpressCheckoutPayment
- DoCapture
- RefundTransaction
- DoVoid
Negative Test the App
You can use the flexibility of API Extensions and the error codes that PayPal exposes through their API to negative test your application and ensure it throws errors as expected.
Enable Negative Testing on Your PayPal Sandbox
- Go to the PayPal Developer page and log in with your merchant credentials.
- Click Dashboard to go to your account dashboard.
- Under Sandbox, click Accounts.
- Expand the email address for the test account you want to use and click Profile:
- On the Settings tab, turn on negative testing:
Example: Force Error 10001 in a Negative Test
The code in this sample triggers PayPal Error code 10001 on SetExpressCheckout. Because the test is amount-related, 10001 is converted to 100.01.
- In Admin, go to Settings > System Administration > Action Management to display the Action Management JSON Editor.
- Add the following code to the configurations array:
"configurations": [{ "configuration" : { "paypal" : { "setExpressCheckout" : {"maxAmount" : "100.01"}, "getExpressCheckoutDetails" : {"token" : "10004"}, "authorization" : {"amount" : "100.01"}, "capture" : {"amount" : "100.01"}, "void" : {"authorizationId": "10623"}, "refund" : {"amount" : "100.01"} } } }]
Enable Detailed Logging on API Extension Actions
If you have API Extensions fully enabled on your Kibo eCommerce developer account, you can view log files of all the code actions that have executed on your tenant.
- In Admin, go to Settings > System Administration > Action Management to display the Action Management JSON Editor.
- Change
defaultLogLevel
to"info"
. - In the Dev Center console, go to Logs > Action Logs.
- Select your tenant and click Search to see the actions.