PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.19
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.19
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
formidable / stripe / controllers / FrmStrpLitePaymentsController.php

FrmStrpLitePaymentsController.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More 6.19, at stripe/controllers/FrmStrpLitePaymentsController.php

33 lines 696 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 die( 'You are not allowed to call this page directly.' );
4 }
5
6 class FrmStrpLitePaymentsController {
7
8 /**
9 * Get the receipt link for a Stripe payment.
10 *
11 * @param string $receipt
12 * @return string
13 */
14 public static function get_receipt_link( $receipt ) {
15 $url = 'https://dashboard.stripe.com/';
16
17 if ( 0 === strpos( $receipt, 'sub_' ) ) {
18 $url .= 'subscriptions/';
19 } elseif ( 0 === strpos( $receipt, 'seti_' ) ) {
20 $url .= 'setup_intents/';
21 } else {
22 $url .= 'payments/';
23 }
24
25 $url .= $receipt;
26
27 $link = '<a href="' . esc_url( $url ) . '" target="_blank">';
28 $link .= esc_html( $receipt );
29 $link .= '</a>';
30 return $link;
31 }
32 }
33