Paypal Checkout SDK - immediate payment

Yalmaz
Contributor
Contributor

Hello,

 

I need to use Paypal check in order to accept immediate payment on my Laravel website, and I switched from old Paypal PHP SDK to the new Paypal checkout SDK to support API V2.

I followed the samples codes that provided in the new SDK, I`ve to create all workflow on my server, so I created an order with intent=CAPTURE with other required fields.

 

After executing the order:

 

 

 

PayPalHttp\HttpResponse {#452 ▼
  +statusCode: 201
  +result: {#441 ▼
    +"id": "3U033516D5196164X"
    +"status": "COMPLETED"
    +"purchase_units": array:1 [▼
      0 => {#437 ▼
        +"reference_id": "default"
        +"payments": {#447 ▼
          +"captures": array:1 [▼
            0 => {#436 ▼
              +"id": "5MC33242CB555474F"
              +"status": "PENDING"
              +"status_details": {#439 ▼
                +"reason": "PENDING_REVIEW"
              }
              +"amount": {#442 ▶}
              +"final_capture": true
              +"seller_protection": {#443 ▶}
              +"links": array:3 [▶]
              +"create_time": "2020-09-20T18:24:51Z"
              +"update_time": "2020-09-20T18:24:51Z"
            }
          ]
        }
      }
    ]
    +"payer": {#449 ▶}
    +"links": array:1 [▼
      0 => {#451 ▼
        +"href": "https://api.sandbox.paypal.com/v2/checkout/orders/3U033516D5196164X"
        +"rel": "self"
        +"method": "GET"
      }
    ]
  }
  +headers: array:7 [▼
    "" => ""
    "Cache-Control" => "max-age=0, no-cache, no-store, must-revalidate"
    "Content-Length" => "1024"
    "Content-Type" => "application/json"
    "Date" => "Sun, 20 Sep 2020 18"
    "Paypal-Debug-Id" => "e52a251c36ff8"
    "Set-Cookie" => "X-PP-SILOVER=name%3DLIVE3.WEB.1%26silo_version%3D880%26app%3Dapiplatformproxyserv%26TIME%3D1591643782%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Path=/; Domain=paypa ▶"
  ]
}

 

 

 

So after directing the user to the approval page, then after approving the payment, then executing the order, I got the above result which shows the Order status is completed but the payment status is still "pending" and the reason is "PENDING_REVIEW", so I would like to ask if there is any error or something missed to make the payment immediately without waiting for review.

 

Thanks.

 

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

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