Great plugin in general!
I would like to add some placeholders to the emails.
I have a custom credit card payment merchant gateway, and after payment I get some return values i.e. transaction ID, bank message etc.
I would like to add these into the emails.
The extra data is saved in an extra table.
Here is what I tried but didn’t work:
In the class-haetshopstyling.php, function getBillingData I added the table with the field names like this:
$sql = "SELECT date,base_shipping,gateway,totalprice,trid,rc,rt
FROM ".$wpdb->prefix."wpsc_purchase_logs AS logs
JOIN ".$wpdb->prefix."wpsc_cib_transactions AS trx
ON logs.id=trx.shtrid
WHERE logs.id = ".(int)$purchase_id;
And added the unique_names like this:
$params[]= array('unique_name'=>'bank_trid','value'=>$params2[0]['trid']);
$params[]= array('unique_name'=>'bank_return_code','value'=>$params2[0]['rc']);
$params[]= array('unique_name'=>'bank_message','value'=>$params2[0]['rt']);
(I even managed to get them in the editor dropdown with modifying editor_checkoutform_fields.js.php)
But it doesn’t wanna give me what I want.
I figured that the getBillingData function is called before the I get to the bank payment site, and of course at that time there are no messages from the bank as the payment is not done yet.
And somehow even when I resend the bill to the buyer later these values still don’t show up.
What can I do to solve this mystery?
Thanks!