# formidable/trunk/stripe/controllers/FrmStrpLitePaymentsController.php

Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes &amp; More, version trunk. 32 lines.

- Page: https://pluginprobe.com/plugins/formidable/trunk/code/stripe/controllers/FrmStrpLitePaymentsController.php
- Raw: https://pluginprobe.com/plugins/formidable/trunk/raw/stripe/controllers/FrmStrpLitePaymentsController.php
- Modified: 2026-01-13T16:28:50+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/formidable/trunk/code/stripe/controllers/FrmStrpLitePaymentsController.php#L10-L20`.

```php
<?php
if ( ! defined( 'ABSPATH' ) ) {
	die( 'You are not allowed to call this page directly.' );
}

class FrmStrpLitePaymentsController {

	/**
	 * Get the receipt link for a Stripe payment.
	 *
	 * @param string $receipt
	 *
	 * @return string
	 */
	public static function get_receipt_link( $receipt ) {
		$url = 'https://dashboard.stripe.com/';

		if ( str_starts_with( $receipt, 'sub_' ) ) {
			$url .= 'subscriptions/';
		} elseif ( str_starts_with( $receipt, 'seti_' ) ) {
			$url .= 'setup_intents/';
		} else {
			$url .= 'payments/';
		}

		$url  .= $receipt;
		$link  = '<a href="' . esc_url( $url ) . '" target="_blank">';
		$link .= esc_html( $receipt );
		return $link . '</a>';
	}
}

```
