Project

General

Profile

Actions

Bug #7687

closed

PayPal Pro: Website Payments Pro duplicate payment

Added by krileon about 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Target version:
Start date:
15 August 2019
Due date:
% Done:

100%

Estimated time:

Description

The Website Payments Pro implementation is firing the payment API twice, which in some cases causes a double payment.

https://www.joomlapolis.com/forum/277-cb-paid-subscriptions-support/241457-duplicate-payments-for-same-sub-via-paypal-pro#313823

This does not appear to be an issue for the Payflow implementation.

Actions #1

Updated by krileon about 3 years ago

INVNUM is sent to help prevent duplicate payments, but appears the Paypal account setting shown below can bypass this entirely.

https://www.paypal.com/us/smarthelp/article/how-do-i-avoid-duplicate-transactions-ts1097

Regardless double payment attempt within CBSubs it self needs to be fixed.

Actions #2

Updated by krileon about 3 years ago

Looks like the pay button is causing a double request. One call is made to the POST URL then cancelled then another call is made. This is likely why double payment attempt is happening. If the cancel doesn't happen or the request goes through before the cancel can happen it will cause a double attempt. Since the two attempts are then happening at the same time it's not possible for each other to stop one or the other. The form handling code needs improved to stop doing this.

Actions #3

Updated by krileon about 3 years ago

The form is doing this because it's a submit button and the jQuery bound to it is bound to click event. The submit needs to either be JS based or not; not both.

Actions #4

Updated by krileon about 3 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

Fixed in MR !165

Actions #5

Updated by beat about 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF