Ckeckout PayPal

Integration Workflow

Sync/Async Processing

The payment processing works in asynchronous mode. In an asynchronous workflow, a redirection takes place to allow the account holder to complete/verify the payment. After this, the account holder is redirected back to the app and the status of the payment can be queried.

Workflow

Step 1: Shopper selects PayPal payment method at checkout.

Step 2: Merchant sends the initial request and redirects the shopper to the returned PayPal redirect url.

Step 3: Shopper logs into his PayPal account or registers himself.

Step 4: The shopper confirms the payment.

Step 5: PayPal approves or declines the transaction.

Step 6: The shopper is redirected back to the shopperResultUrl

Step 7: The merchant requests the final status of the payment

Step 8: The merchant confirms the the final status to the shopper.

Payment Widget Form

PayPal Payment Widget Request

authentication.userId=8a8294174b7ecb28014b9699220015cc
authentication.password=sy6KJsT8
authentication.entityId=8a8294174b7ecb28014b9699220015ca
merchantTransactionId=customTxId
amount=4.00
currency=EUR
paymentType=PA
cart.items[0].name=iphone
cart.items[0].quantity=1
cart.items[0].price=4.00
customParameters[PAYPAL_PAYMENTREQUEST_0_INVNUM]=abcd-1234-abced-1234
customParameters[PAYPAL_USE_NEW_VERSION]=Yes

Server-to-Server Integration

PayPal Request

authentication.userId=8a8294174b7ecb28014b9699220015cc
authentication.password=sy6KJsT8
authentication.entityId=8a8294174b7ecb28014b9699220015ca
merchantTransactionId=customTxId
amount=4.00
currency=EUR
paymentType=PA
cart.items[0].name=iphone
cart.items[0].quantity=1
cart.items[0].price=4.00
customParameters[PAYPAL_PAYMENTREQUEST_0_INVNUM]=abcd-1234-abced-1234
customParameters[PAYPAL_USE_NEW_VERSION]=Yes
paymentBrand=PAYPAL
virtualAccount.accountId=CHtest123@gmail.com
shopperResultUrl=https://docs.oppwa.com

Example PayPal Response

{
"id":"8a82944954bf044c0154cefc733f1943",
"paymentType":"PA",
"paymentBrand":"PAYPAL",
"amount":"92.12",
"currency":"EUR",
"descriptor":"0397.9339.4338 OPP_Channel_old ",
"merchantTransactionId":"x18m-AllParamsVATest",
"result":{
"code":"000.200.000",
"description":"transaction pending"
},
"resultDetails":{
"ConnectorTxID3":"bf044c0154cefc733f1943",
"ConnectorTxID2":"8a829449",
"ConnectorTxID1":"8a82944954bf044c0154cefc733f1943"
},
"redirect":{
"url":"https://test.ppipe.net/connectors/simulator;jsessionid=33D90CE2F8086217BB2FA5CB32D00969.sbg-vm-con01",
"parameters":[
{
"name":"useraction",
"value":"commit"
},
{
"name":"token",
"value":"EC-4MJ483968G697473T"
},
{
"name":"ndcid",
"value":"8a8294174b7ecb28014b9699a3cf15d1_961bf86199ee49ec960fe5ccc44a28db"
},
{
"name":"connector",
"value":"PAYPAL"
},
{
"name":"cmd",
"value":"_express-checkout"
}
]
},
"buildNumber":"c724840a1e553b5d2f76f2f03c9ffb260a72f91d@2016-05-17 14:47:50 +0000",
"timestamp":"2016-05-20 16:25:31+0000",
"ndc":"8a8294174b7ecb28014b9699a3cf15d1_961bf86199ee49ec960fe5ccc44a28db"
}

Test Data

For testing you may use the test account details listed below. It is important to note that the system has two test modes available to cause requests to be sent to the connector simulator or to the connector's own test platform, as required:

  • testMode=EXTERNAL causes test transactions to be forwarded to the processor's test system for 'end-to-end' testing

  • testMode=INTERNAL causes transactions to be sent to our simulators, which is useful when switching to the live endpoint for connectivity testing

This test data is only working in testMode=INTERNAL. When using testMode=EXTERNAL, you will get a pending status response in 'error in asynchronous workflow (90); Previously pending transaction timed out (100.396.103)'.

How to check transaction activity

After the shopper complete the transactions, PayPal displays those transactions in the Recent activity table located on the Summary page of your PayPal account.

Step 1: Log in to your PayPal account.

Step 2: Click the table heading "Activity" The Activity table is displayed and shows all transaction activity for the past 30 days.

Step 3: Select options from the Active, All transactions, and All currencies menus to filter for a specific type of transaction activity. You can also use the search tool to filter activity. When viewing transaction activity, the status of payments can be:

  • Completed: Transactions were successful, and funds were credited to your account.

  • Cleared: Payments cleared senders' accounts, and funds were credited to your account.

  • Uncleared: Payments have not cleared sender's accounts, and funds were not credited.