Sandbox Payment Pending

CostCloud
New Community Member

Hello All Of You,

 

Me getting some issue when me paypal sandbox  payment throup Credit Card  but its goes to pending every time and nothing transaction  showing in Merchant sandbox Transactions .

 

Note : - Me call following bellow given code : - 

 

URL : https://api.sandbox.paypal.com/v1/payments/payment/

Headers : 

Content-Type:application/json
Authorization:Bearer A101.UKA-LSC4qIz71LvWxMVQl5Qq4tkI64uijKALaDumLn6zcM9HNhBhrYS36_Qv57pU.VHC6S4gCBBDkhR8XG1CGh3ZxkgS

 

Body Raw : 

{
  "intent": "sale",
  "payer": {"payment_method": "credit_card","funding_instruments":[{"credit_card_token": {"credit_card_id": "CARD-9PU56480NW099852LLASV35A", "payer_id": "1"}}]},
  "transactions":[{"amount":{"total": "11.11","currency": "USD"},"description": "This is the payment transaction description for cost cloud."}]

}

 

Response :

{
"id": "PAY-8E323863G18720357LAUVPDQ",
"create_time": "2016-11-14T06:19:58Z",
"update_time": "2016-11-14T06:20:21Z",
"state": "approved",
"intent": "sale",
"payer": {
"payment_method": "credit_card",
"funding_instruments": [
{
"credit_card_token": {
"credit_card_id": "CARD-1FU01293T6904611ELAUVOYQ",
"payer_id": "1",
"last4": "1881",
"type": "visa",
"expire_month": "11",
"expire_year": "2016"
}
}
]
},
"transactions": [
{
"amount": {
"total": "11.11",
"currency": "USD",
"details": {
"subtotal": "11.11"
}
},
"description": "This is the payment transaction description for cost cloud.",
"related_resources": [
{
"sale": {
"id": "9C061575HG577041N",
"create_time": "2016-11-14T06:19:58Z",
"update_time": "2016-11-14T06:20:21Z",
"amount": {
"total": "11.11",
"currency": "USD"
},
"state": "pending",
"parent_payment": "PAY-8E323863G18720357LAUVPDQ",
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/payments/sale/9C061575HG577041N",
"rel": "self",
"method": "GET"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/sale/9C061575HG577041N/refund",
"rel": "refund",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-8E323863G18720357LAUVPDQ",
"rel": "parent_payment",
"method": "GET"
}
],
"fmf_details": {},
"processor_response": {
"avs_code": "X",
"cvv_code": "M"
}
}
}
]
}
],
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-8E323863G18720357LAUVPDQ",
"rel": "self",
"method": "GET"
}
]
}

 

--

Thank's & Regards,

Mahesh Kumar Dhakad
+919977386130

 

Login to Me Too
1 REPLY 1

MTS_Justin
Moderator
Moderator

Hello Costcloud !

 

The reason your payment is in "pending" status, is that you have only 'created' the payment, but have not yet 'executed' the payment.  Payments which have only been created, will show a status of 'pending' as they are waiting to be executed.

 

There are two steps to each payments API transaction :

 

1. Create the payment

 

2. Execute the payment

 

https://developer.paypal.com/docs/api/payments/

 

Best,

Justin

MTS

 

 

 


Was my post helpful? If so, please give me a kudos!
Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.