PrimeiroPay
Search…
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
1
authentication.userId=8a8294174b7ecb28014b9699220015cc
2
authentication.password=sy6KJsT8
3
authentication.entityId=8a8294174b7ecb28014b9699220015ca
4
merchantTransactionId=customTxId
5
amount=4.00
6
currency=EUR
7
paymentType=PA
8
cart.items[0].name=iphone
9
cart.items[0].quantity=1
10
cart.items[0].price=4.00
11
customParameters[PAYPAL_PAYMENTREQUEST_0_INVNUM]=abcd-1234-abced-1234
12
customParameters[PAYPAL_USE_NEW_VERSION]=Yes
13
Copied!

Server-to-Server Integration

PayPal Request
1
authentication.userId=8a8294174b7ecb28014b9699220015cc
2
authentication.password=sy6KJsT8
3
authentication.entityId=8a8294174b7ecb28014b9699220015ca
4
merchantTransactionId=customTxId
5
amount=4.00
6
currency=EUR
7
paymentType=PA
8
cart.items[0].name=iphone
9
cart.items[0].quantity=1
10
cart.items[0].price=4.00
11
customParameters[PAYPAL_PAYMENTREQUEST_0_INVNUM]=abcd-1234-abced-1234
12
customParameters[PAYPAL_USE_NEW_VERSION]=Yes
13
paymentBrand=PAYPAL
14
virtualAccount.accountId=CHte[email protected]
15
shopperResultUrl=https://docs.oppwa.com
Copied!
Example PayPal Response
1
{
2
"id":"8a82944954bf044c0154cefc733f1943",
3
"paymentType":"PA",
4
"paymentBrand":"PAYPAL",
5
"amount":"92.12",
6
"currency":"EUR",
7
"descriptor":"0397.9339.4338 OPP_Channel_old ",
8
"merchantTransactionId":"x18m-AllParamsVATest",
9
"result":{
10
"code":"000.200.000",
11
"description":"transaction pending"
12
},
13
"resultDetails":{
14
"ConnectorTxID3":"bf044c0154cefc733f1943",
15
"ConnectorTxID2":"8a829449",
16
"ConnectorTxID1":"8a82944954bf044c0154cefc733f1943"
17
},
18
"redirect":{
19
"url":"https://test.ppipe.net/connectors/simulator;jsessionid=33D90CE2F8086217BB2FA5CB32D00969.sbg-vm-con01",
20
"parameters":[
21
{
22
"name":"useraction",
23
"value":"commit"
24
},
25
{
26
"name":"token",
27
"value":"EC-4MJ483968G697473T"
28
},
29
{
30
"name":"ndcid",
31
"value":"8a8294174b7ecb28014b9699a3cf15d1_961bf86199ee49ec960fe5ccc44a28db"
32
},
33
{
34
"name":"connector",
35
"value":"PAYPAL"
36
},
37
{
38
"name":"cmd",
39
"value":"_express-checkout"
40
}
41
]
42
},
43
"buildNumber":"[email protected] 14:47:50 +0000",
44
"timestamp":"2016-05-20 16:25:31+0000",
45
"ndc":"8a8294174b7ecb28014b9699a3cf15d1_961bf86199ee49ec960fe5ccc44a28db"
46
}
Copied!
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.
Last modified 1yr ago