@@ -93,6 +93,11 @@ public static function changeColumnData($value, $lead_id, $index, $Entry){
93
93
$ Transaction = $ Dao ->getTransactionByLeadId ($ Entry ['id ' ]);
94
94
$ value = $ Transaction ->transaction_id ;
95
95
}
96
+ else if ( $ index == 'order_id ' ){
97
+ $ Dao = new GFDibsDao ();
98
+ $ Transaction = $ Dao ->getTransactionByLeadId ($ Entry ['id ' ]);
99
+ $ value = $ Transaction ->order_id ;
100
+ }
96
101
else if ( $ index == 'payment_status ' ){
97
102
$ Dao = new GFDibsDao ();
98
103
$ Transaction = $ Dao ->getTransactionByLeadId ($ Entry ['id ' ]);
@@ -199,7 +204,6 @@ public static function dibsTransition($confirmation, $form, $lead, $ajax){
199
204
$ Dao = new GFDibsDao ();
200
205
_log ('GFDibsHook::dibsTransition() ' );
201
206
202
-
203
207
if ( $ feed_id = $ Dao ->isDibsForm ($ form ['id ' ]) ){
204
208
$ feed = $ Dao ->getDibsMeta ($ feed_id );
205
209
@@ -250,10 +254,24 @@ public static function dibsTransition($confirmation, $form, $lead, $ajax){
250
254
if ( $ key == 'billingEmail ' ){
251
255
$ _POST ['email ' ] = $ _POST [$ key ];
252
256
}
253
-
254
257
}
255
258
}
256
259
260
+ // set ordertext
261
+ $ _POST ['ordertext ' ] = null ;
262
+ if ( isset ($ _POST ['billingFirstName ' ]) ){
263
+ $ _POST ['ordertext ' ] .= $ _POST ['billingFirstName ' ]." " ;
264
+ }
265
+ if ( isset ($ _POST ['billingLastName ' ]) ){
266
+ $ _POST ['ordertext ' ] .= $ _POST ['billingLastName ' ]." " ;
267
+ }
268
+
269
+ if ( isset ($ _POST ['email ' ]) ){
270
+ $ _POST ['ordertext ' ] .= "( " .$ _POST ['email ' ].") " ;
271
+ }
272
+ $ _POST ['ordertext ' ] = trim ($ _POST ['ordertext ' ]);
273
+
274
+
257
275
// $_POST['orderId'] = hexdec(uniqid());
258
276
$ _POST ['leadId ' ] = $ lead ['id ' ];
259
277
@@ -303,7 +321,7 @@ public static function dibsTransition($confirmation, $form, $lead, $ajax){
303
321
$ Dao ->log ($ transaction_id );
304
322
305
323
306
- $ confirmation = '<form action=" ' .get_option (DIBS_POST_URL ).'" name="dibs_post_form" id="dibs_post_form" method="post" > ' ;
324
+ $ confirmation = '<form action=" ' .get_option (DIBS_POST_URL ).'" name="dibs_post_form" id="dibs_post_form" method="post" accept-charset="utf-8" > ' ;
307
325
foreach ($ _POST as $ key => $ value ) {
308
326
if ( !is_numeric (strpos ($ key , 'input ' )) && !is_numeric (strpos ($ key , 'MAX_FILE_SIZE ' )) && !is_numeric (strpos ($ key , 'state ' )) && !is_numeric (strpos ($ key , 'gform ' )) ){
309
327
$ confirmation .= sprintf ('<input type="hidden" name="%s" id="%s" value="%s" /> ' , $ key , $ key , $ value );
0 commit comments