Title: payment gateway implementation
Last modified: August 24, 2016

---

# payment gateway implementation

 *  [jmattlawrence](https://wordpress.org/support/users/jmattlawrence/)
 * (@jmattlawrence)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/payment-gateway-implementation/)
 * 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/](https://wordpress.org/plugins/wp-e-commerce/)

Viewing 1 replies (of 1 total)

 *  [whitelamp](https://wordpress.org/support/users/whitelamp/)
 * (@whitelamp)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/payment-gateway-implementation/#post-5991467)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-e-commerce_ebebeb.svg)
 * [WP eCommerce](https://wordpress.org/plugins/wp-e-commerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-e-commerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-e-commerce/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-e-commerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-e-commerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-e-commerce/reviews/)

## Tags

 * [payment gateway](https://wordpress.org/support/topic-tag/payment-gateway/)

 * 1 reply
 * 2 participants
 * Last reply from: [whitelamp](https://wordpress.org/support/users/whitelamp/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/payment-gateway-implementation/#post-5991467)
 * Status: not resolved