Jump to content

PayPal Checkout does not handle PENDING -> COMPLETED?


niels

Recommended Posts

WHMCS version: 8.1.3 Module: PayPal Checkout

The module works fine most of the time: it creates subscriptions, processes payments, etc. Where it fails is when it receives a payment that's pending first, completed later.

The "PAYMENT.CAPTURE.PENDING" event is processed correctly, which is to say, WHMCS recognizes this as a "Payment Pending" event in the Gateway Log.

But when the "PAYMENT.CAPTURE.COMPLETED" event comes in, WHMCS does nothing. It just lists it in the Gateway Log as "Information Only".

 

Am I doing something wrong? Or is this issue going unnoticed because it's relatively rare for a payment to go through these 2-steps. (Basically only payments that PayPal deems high-risk and wants to review first.)

I'm copying a "completed" event below, just in case someone sees anything unusual:

id => WH-HIDDEN-HIDDEN
event_version => 1.0
create_time => 2021-03-06T00:23:32.105Z
resource_type => capture
resource_version => 2.0
event_type => PAYMENT.CAPTURE.COMPLETED
summary => Payment completed for $ HIDDEN USD
resource => 
    id => HIDDEN
    amount => 
        currency_code => USD
        value => HIDDEN
    final_capture => 1
    seller_protection => 
        status => ELIGIBLE
        dispute_categories => 
            0 => ITEM_NOT_RECEIVED
            1 => UNAUTHORIZED_TRANSACTION
    seller_receivable_breakdown => 
        gross_amount => 
            currency_code => USD
            value => HIDDEN
        paypal_fee => 
            currency_code => USD
            value => HIDDEN
        net_amount => 
            currency_code => USD
            value => HIDDEN
    invoice_id => HIDDEN
    status => COMPLETED
    create_time => 2021-03-05T00:23:26Z
    update_time => 2021-03-06T00:23:32Z
    links => 
        0 => 
            href => https://api.paypal.com/v2/payments/captures/HIDDEN
            rel => self
            method => GET
        1 => 
            href => https://api.paypal.com/v2/payments/captures/HIDDEN/refund
            rel => refund
            method => POST
        2 => 
            href => https://api.paypal.com/v2/checkout/orders/HIDDEN
            rel => up
            method => GET
links => 
    0 => 
        href => https://api.paypal.com/v1/notifications/webhooks-events/WH-HIDDEN-HIDDEN
        rel => self
        method => GET
    1 => 
        href => https://api.paypal.com/v1/notifications/webhooks-events/WH-HIDDEN-HIDDEN/resend
        rel => resend
        method => POST

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated