WordPress.org

Ready to get started?Download WordPress

Forums

WP eCommerce
No Transaction Report email (12 posts)

  1. 3C's
    Member
    Posted 11 months ago #

    Greetings,
    I've been using this plugin, without issue for about 1.5 yrs. After a recent upgrade to version 3.8.12.1, I am no longer receiving Transaction Report emails, nor is the customer. For the time begin, I've been manually creating/sending the email, but this is getting old fast.

    For my payment gateway, I am using eProcessingNetwork Gateway.

    I've thoroughly searched and read the forums, and have found no solution. Anybody have any thoughts or suggestions?

    Thank you!

    Nate

    http://wordpress.org/plugins/wp-e-commerce/

  2. santaguida
    Member
    Posted 11 months ago #

    any luck with this? i am receiving a transaction report of the customer uses the test gateway (which i use to allow for corporate accounts) but no transaction log is generated if a customer pays by credit card. help!

  3. whitelamp
    Member
    Posted 11 months ago #

  4. 3C's
    Member
    Posted 11 months ago #

    Thanks for the reply, Whitelamp. Just to be clear, are you saying that if I add:

    $note = “Payment completed”;
    $data = array(
    ‘processed’ => WPSC_Purchase_Log::ACCEPTED_PAYMENT,
    ‘notes’ => $note,
    ‘transactid’ => $ticketnum,
    ‘date’ => time(),
    );
    $purchase_log = new WPSC_Purchase_Log( $sessionid, ‘sessionid’ );
    $purchase_log->set( $data );
    $purchase_log->save();

    to my payment gateway php file, emails will start sending once again? Once an order is complete, the order status changes to accepted payment w/o issue. However, this change is not triggering the emails. (even if I change order status from accepted -> received -> accepted).

    Thanks for the help, this has making steam come out of my ears.

    Nate

  5. whitelamp
    Member
    Posted 11 months ago #

    Nate,

    no guarantees, but it's worked for me.

  6. 3C's
    Member
    Posted 11 months ago #

    unfortunately, no such luck.

  7. Mihai
    Member
    Plugin Author

    Posted 11 months ago #

    depending on the gateway : if its built as a plugin or you have it as a file inside the wpec/merchants plugin

    You basically should have something like this in case purchase is complete:

    $purchase_log = new WPSC_Purchase_Log( $sessionid, 'sessionid' );
    $purchase_log->set( 'processed', WPSC_Purchase_Log::ACCEPTED_PAYMENT );
    $purchase_log->save();

    Cant say for sure without seeing the code but $sessionid should be already set in your code.

  8. whitelamp
    Member
    Posted 11 months ago #

    @misulicus - that should trigger the email, sure, but you do generally want to set 'transactid' and 'date' at the same time, as in my suggested code.

    @nate - use pastebin.com to show us the code and we can have a quick look.

  9. 3C's
    Member
    Posted 11 months ago #

    Thanks for taking a look. Never used pastebin, so here it goes.

    <script src="http://pastebin.com/embed_js.php?i=wMpguDMe"></script>

    http://pastebin.com/raw.php?i=wMpguDMe

  10. whitelamp
    Member
    Posted 11 months ago #

    OK, that's great, though if you choose "PHP" from the syntax menu then it colours everything nicely to make it easier to read.

    Which mode are you in? Do you take credit card details on your site or off-site?

    There's two places currently where the status is updated to "accepted payment":
    $this->set_transaction_details(substr($response,11,6), 3 );

    Both places should be updated, although obviously you'll only be using one.

    Apart from that, that code scares me rigid. There's no hashing or encryption to prevent people fiddling with the purchase details and there's nothing I can see to prevent a spoofed acceptance.
    That's on top of handling credit card numbers which I really don't think should be done on a wordpress site... even if you can get PCI compliance.

  11. 3C's
    Member
    Posted 11 months ago #

    Thanks Whitelamp.
    http://pastebin.com/9HDQhVkc

    CC's are accepted offsite.

    What do I need to change the following code to?

    $this->set_transaction_details(substr($response,11,6), 3 );
    $this->go_to_transaction_results($this->cart_data['session_id'])

    and

    $merchantTransaction->set_transaction_details($merchantTransaction->purchase_id , 3 );
    $merchantTransaction->go_to_transaction_results($merchantTransaction->session_id);

  12. whitelamp
    Member
    Posted 11 months ago #

    If it's off-site then this is the one you need to comment out:

    $merchantTransaction->set_transaction_details($merchantTransaction->purchase_id , 3 );
    
    $note = “Payment completed”;
    $data = array(
    ‘processed’ => WPSC_Purchase_Log::ACCEPTED_PAYMENT,
    ‘notes’ => $note,
    ‘transactid’ => $ticketnum,
    ‘date’ => time(),
    );
    $purchase_log = new WPSC_Purchase_Log( $_POST['SessID'], ‘sessionid’ );
    $purchase_log->set( $data );
    $purchase_log->save();

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

    $ticketnum should be whatever makes the most sense out of what gets POSTed back to you.

Reply

You must log in to post.

About this Plugin

About this Topic