Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.4.0-b1
-
Component/s: None
-
Labels:None
Description
To reproduce:
- Visit the client payment page
- Start a payment
- Use the test number "4000008400001629"
- Continue to payment confirmation
- Submit the payment
- See error "Your card was declined"
- Then view the new transaction in the widget, see that it is in the pending tab instead of the declined tab
Activity
| Field | Original Value | New Value |
|---|---|---|
| Rank | Ranked higher |
| Fix Version/s | 5.4.0-b1 [ 11719 ] | |
| Fix Version/s | Short Term [ 10800 ] |
| Sprint | 5.4.0 Sprint 1 [ 148 ] |
| Rank | Ranked lower |
| Assignee | Abdy Franco [ abdy ] |
| Remaining Estimate | 0 minutes [ 0 ] | |
| Time Spent | 4 hours, 52 minutes [ 17520 ] | |
| Worklog Id | 15471 [ 15471 ] |
| Status | Open [ 1 ] | In Progress [ 3 ] |
| Status | In Progress [ 3 ] | In Review [ 5 ] |
| Resolution | Fixed [ 1 ] |
| Time Spent | 4 hours, 52 minutes [ 17520 ] | 1 day, 1 hour, 22 minutes [ 33720 ] |
| Worklog Id | 15472 [ 15472 ] |
| Time Spent | 1 day, 1 hour, 22 minutes [ 33720 ] | 1 day, 1 hour, 33 minutes [ 34380 ] |
| Worklog Id | 15528 [ 15528 ] |
| Time Spent | 1 day, 1 hour, 33 minutes [ 34380 ] | 1 day, 1 hour, 52 minutes [ 35520 ] |
| Worklog Id | 15536 [ 15536 ] |
| Time Spent | 1 day, 1 hour, 52 minutes [ 35520 ] | 1 day, 2 hours, 15 minutes [ 36900 ] |
| Worklog Id | 15537 [ 15537 ] |
| Time Spent | 1 day, 2 hours, 15 minutes [ 36900 ] | 1 day, 3 hours, 24 minutes [ 41040 ] |
| Worklog Id | 15553 [ 15553 ] |
| Sprint | 5.4.0 Sprint 1 [ 148 ] | 5.4.0 Sprint 2 [ 149 ] |
| Rank | Ranked higher |
| Time Spent | 1 day, 3 hours, 24 minutes [ 41040 ] | 1 day, 3 hours, 43 minutes [ 42180 ] |
| Worklog Id | 15555 [ 15555 ] |
| Time Spent | 1 day, 3 hours, 43 minutes [ 42180 ] | 1 day, 3 hours, 58 minutes [ 43080 ] |
| Worklog Id | 15581 [ 15581 ] |
| Status | In Review [ 5 ] | Closed [ 6 ] |
One thing we can consider is changing StripePayments::captureStoredCc:
$payment_intent = $this->handleApiRequest( ['Stripe\PaymentIntent', 'retrieve'], [$transaction_reference_id], $this->base_url . 'payment_intents - retrieve' );To
$payment_intent = $this->handleApiRequest( ['Stripe\PaymentIntent', 'retrieve'], [$transaction_reference_id], $this->base_url . 'payment_intents - retrieve' ); if (!empty($payment_intent->charges->data[0]->failure_code)) { return [ 'status' => in_array( $payment_intent->charges->data[0]->failure_code, ['card_declined', 'bank_account_declined'] ) ? 'declined' : 'error', 'reference_id' => (isset($payment_intent->id) ? $payment_intent->id : null), 'transaction_id' => (isset($payment_intent->charges->data[0]->id) ? $payment_intent->charges->data[0]->id : null), 'message' => $payment_intent->charges->data[0]->failure_message ]; }And views/default/cc_form.pdt
if (result.error) { var errorElement = document.getElementById('stripe-error-box'); errorElement.textContent = result.error.message; $(this).blestaEnableFormSubmission($('#stripe-error-box').closest('form')); } else { // Resubmit the form, bypassing this handler resubmitPaymentConfirmation(); }To
// Resubmit the form, bypassing this handler resubmitPaymentConfirmation();This would resolve the proposed situation, but might not be ideal in every circumstance.