Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/RapidHtml.php |
— | — | @@ -52,6 +52,9 @@ |
53 | 53 | '@gateway', // => 'payflowpro', // this may need to become dynamic in the future |
54 | 54 | '@owa_session', // => $wgRequest->getText( 'owa_session', null ), |
55 | 55 | '@owa_ref', // => $owa_ref, |
| 56 | + // Not actually data tokens, but available to you in html form: |
| 57 | + // @captcha -> the captcha form |
| 58 | + // @script_path -> maps to $wgScriptPath |
56 | 59 | ); |
57 | 60 | |
58 | 61 | /** |
— | — | @@ -77,7 +80,6 @@ |
78 | 81 | |
79 | 82 | public function __construct( &$form_data, &$form_errors ) { |
80 | 83 | global $wgRequest; |
81 | | - |
82 | 84 | parent::__construct( $form_data, $form_errors ); |
83 | 85 | |
84 | 86 | $this->loadValidateJs(); |
— | — | @@ -118,6 +120,8 @@ |
119 | 121 | * @return string The HTML form with real data in it |
120 | 122 | */ |
121 | 123 | public function add_data( $html ) { |
| 124 | + global $wgScriptPath; |
| 125 | + |
122 | 126 | // replace data |
123 | 127 | $form = str_replace( $this->data_tokens, $this->form_data, $html ); |
124 | 128 | |
— | — | @@ -127,6 +131,9 @@ |
128 | 132 | // handle captcha |
129 | 133 | $form = str_replace( "@captcha", $this->getCaptchaHtml(), $form ); |
130 | 134 | |
| 135 | + // handle script path |
| 136 | + $form = str_replace( "@script_path", $wgScriptPath, $form ); |
| 137 | + |
131 | 138 | $form = $this->fix_dropdowns( $form ); |
132 | 139 | |
133 | 140 | return $form; |