Changeset 2486591
- Timestamp:
- 03/04/2021 09:28:41 AM (5 years ago)
- Location:
- integration-of-caldera-forms-and-paystack
- Files:
-
- 4 edited
-
tags/1.1/inc/class-icfp.php (modified) (5 diffs)
-
tags/1.1/inc/config.php (modified) (1 diff)
-
trunk/inc/class-icfp.php (modified) (5 diffs)
-
trunk/inc/config.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
integration-of-caldera-forms-and-paystack/tags/1.1/inc/class-icfp.php
r2486558 r2486591 113 113 } 114 114 115 if( !isset( $config['icfp_payment_description'] ) || empty( $config['icfp_payment_description'] ) ){116 return;117 }118 119 115 if( !isset( $config['icfp_payment_amount'] ) || empty( $config['icfp_payment_amount'] ) ){ 120 116 return; … … 134 130 135 131 $paystack_payment_name = Caldera_Forms::do_magic_tags( $config['icfp_payment_name'] ); 136 $paystack_payment_description = Caldera_Forms::do_magic_tags( $config['icfp_payment_description'] );137 132 138 133 $paystack_payment_email = Caldera_Forms::do_magic_tags( $config['icfp_payment_email'] ); … … 143 138 144 139 if( $paystack_environment == "1" ) { 145 $key = $paystack_live_key;140 $key = $paystack_live_key; 146 141 } else { 147 142 $key = $paystack_test_key; … … 172 167 'timeout' => 60 173 168 ); 174 169 175 170 // POST the data to Paystack 176 171 $request = wp_remote_post($paystack_url, $args); … … 179 174 // Find out what the response code is 180 175 $paystack_response = json_decode(wp_remote_retrieve_body($request)); 181 176 182 177 if ($paystack_response->status) { 183 178 184 179 $url = $paystack_response->data->authorization_url; 185 186 }187 180 $transdata[ 'my_slug' ][ 'url' ] = $url; 188 181 return array( 189 182 'type' => 'success' 190 183 ); 191 184 } 185 return; 192 186 } 193 187 -
integration-of-caldera-forms-and-paystack/tags/1.1/inc/config.php
r2486558 r2486591 46 46 </div> 47 47 48 < div class="caldera-config-group">48 <!-- <div class="caldera-config-group"> 49 49 <label><?php esc_html_e( 'Payment description', 'integrate-caldera-forms-paystack' ); ?> </label> 50 50 <div class="caldera-config-field"> 51 51 <input type="text" class="block-input field-config magic-tag-enabled caldera-field-bind required" id="icfp_payment_description" name="{{_name}}[icfp_payment_description]" value="{{icfp_payment_description}}"> 52 52 </div> 53 </div> 53 </div> --> 54 54 55 55 <div class="caldera-config-group"> -
integration-of-caldera-forms-and-paystack/trunk/inc/class-icfp.php
r2486526 r2486591 113 113 } 114 114 115 if( !isset( $config['icfp_payment_description'] ) || empty( $config['icfp_payment_description'] ) ){116 return;117 }118 119 115 if( !isset( $config['icfp_payment_amount'] ) || empty( $config['icfp_payment_amount'] ) ){ 120 116 return; … … 134 130 135 131 $paystack_payment_name = Caldera_Forms::do_magic_tags( $config['icfp_payment_name'] ); 136 $paystack_payment_description = Caldera_Forms::do_magic_tags( $config['icfp_payment_description'] );137 132 138 133 $paystack_payment_email = Caldera_Forms::do_magic_tags( $config['icfp_payment_email'] ); … … 143 138 144 139 if( $paystack_environment == "1" ) { 145 $key = $paystack_live_key;140 $key = $paystack_live_key; 146 141 } else { 147 142 $key = $paystack_test_key; … … 172 167 'timeout' => 60 173 168 ); 174 169 175 170 // POST the data to Paystack 176 171 $request = wp_remote_post($paystack_url, $args); … … 179 174 // Find out what the response code is 180 175 $paystack_response = json_decode(wp_remote_retrieve_body($request)); 181 176 182 177 if ($paystack_response->status) { 183 178 184 179 $url = $paystack_response->data->authorization_url; 185 186 }187 180 $transdata[ 'my_slug' ][ 'url' ] = $url; 188 181 return array( 189 182 'type' => 'success' 190 183 ); 191 184 } 185 return; 192 186 } 193 187 -
integration-of-caldera-forms-and-paystack/trunk/inc/config.php
r2486526 r2486591 46 46 </div> 47 47 48 < div class="caldera-config-group">48 <!-- <div class="caldera-config-group"> 49 49 <label><?php esc_html_e( 'Payment description', 'integrate-caldera-forms-paystack' ); ?> </label> 50 50 <div class="caldera-config-field"> 51 51 <input type="text" class="block-input field-config magic-tag-enabled caldera-field-bind required" id="icfp_payment_description" name="{{_name}}[icfp_payment_description]" value="{{icfp_payment_description}}"> 52 52 </div> 53 </div> 53 </div> --> 54 54 55 55 <div class="caldera-config-group">
Note: See TracChangeset
for help on using the changeset viewer.