| @@ -22,8 +22,9 @@ | ||
| 22 | 22 | * Get some associated payment objects based on the URL param data. |
| 23 | 23 | * This includes the intent, the entry, and the payments table model instance. |
| 24 | 24 | * |
| 25 | 25 | * @param int|string $form_id |
| 26 | + * | |
| 26 | 27 | * @return array|false |
| 27 | 28 | */ |
| 28 | 29 | public static function get_details_for_form( $form_id ) { |
| 29 | 30 | if ( ! isset( self::$details_by_form_id[ $form_id ] ) ) { |
| @@ -44,8 +45,9 @@ | ||
| 44 | 45 | * |
| 45 | 46 | * @since 6.5.1 |
| 46 | 47 | * |
| 47 | 48 | * @param int|string $form_id |
| 49 | + * | |
| 48 | 50 | * @return void |
| 49 | 51 | */ |
| 50 | 52 | private static function set_details_for_form( $form_id ) { |
| 51 | 53 | $intent_id = FrmAppHelper::simple_get( 'payment_intent' ); |
| @@ -85,8 +87,9 @@ | ||
| 85 | 87 | return; |
| 86 | 88 | } |
| 87 | 89 | |
| 88 | 90 | $entry = FrmEntry::getOne( $payment->item_id, true ); |
| 91 | + | |
| 89 | 92 | if ( ! is_object( $entry ) || (int) $entry->form_id !== $form_id ) { |
| 90 | 93 | return; |
| 91 | 94 | } |
| 92 | 95 | |
| @@ -103,8 +106,9 @@ | ||
| 103 | 106 | * @since 6.5.1 |
| 104 | 107 | * |
| 105 | 108 | * @param object $intent |
| 106 | 109 | * @param bool $is_setup_intent |
| 110 | + * | |
| 107 | 111 | * @return bool True if the client secret is set and valid. |
| 108 | 112 | */ |
| 109 | 113 | private static function verify_client_secret( $intent, $is_setup_intent ) { |
| 110 | 114 | $client_secret_param = $is_setup_intent ? 'setup_intent_client_secret' : 'payment_intent_client_secret'; |