• jmattlawrence

    (@jmattlawrence)


    Hi,
    I have the submit function in the payment gateway, this function makes a soap client call. What should I do after the call, after I get the response? Because I can’t reach the parse_gateway_notification and process_gateway_notification functions. What’s the difference between these two functions, when are they called and for what purpose?
    Thanks!

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

Viewing 1 replies (of 1 total)
  • whitelamp

    (@whitelamp)

    The parse / process notification functions are generally used when the payment gateway is of the hosted type where the user is redirected to paymentsystem.com to enter their credit card details.
    Most (but not all) such systems then perform a “callback” to the site to inform it that they paymenbt has gone through (or been declined).

    This callback goes to

    yoursite.com/index.php?wpsc_action=gateway_notification&gateway=gateway_name

    If the gateway is written correctly then parse_gateway_notification is called on object construction.
    The convention seems to be to take whatever is in the GET or POST
    and put it in $callback_values. Generally at least two – status
    and transaction ID.

    Then process_gateway_notification is called after object
    construction; process $callback_values and update database.
    NB that since 2012 (?) transaction_results() no longer despatches emails etc; you need to use $purchase_log->save() which sends
    emails when the ‘processed’ status changes to paid.

    If you are doing a SOAP call then I guess you are not going off-site and therefore not getting a callback. In which case your gateway just needs to set up the purchase_log and save() it as above in order to trigger the emails to customer and site admin.

Viewing 1 replies (of 1 total)
  • The topic ‘payment gateway implementation’ is closed to new replies.