Support » Plugin: WP eCommerce » [Plugin: WP e-Commerce] How to add new Payment Gateway ?

  • Resolved manu1222


    Hi Everyone,

    WP-e-commerce is a great plugin . I need to implement helcim payment gateway with wp-e-commerce which is not available in latest version . could any body please tell me how these merchant files(wp-e-commerce/wpsc-merchant/helcim.php or authorize.php or paypal.php) manage to do work with whole wp-e-commerce . I was able to manage everything except one thing that is my helcim.php page is unable to insert values in 2 tables out of 4 tables but when I use authorize.php then all the four database tables gets updated with new entries . Do I need to integrate my helcim.php page with wp-e-commerce’s functionality but how ?? What would be the best and error free steps one should follow while doing modifications ?


Viewing 7 replies - 1 through 7 (of 7 total)
  • <input type=”hidden” value=”<?php echo wpsc_the_product_id(); ?>” name=”product_id”/>


    Earlier this wpsc_the_product_id() function was getting the correct product id from database i.e 13 but now it is getting 2343 and many more

    2364 <-> 15
    2369 <-> 16
    2371 <-> 17

    could anybody please help

    I found that 2364 is a post id of the product from table wp_posts . In new version of wp-e-commerce I haven’t found this file wpsc-includes/wpsc-query.php . may be thats why wpsc_the_product_id() is getting the_get_Id() i.e post id from product-template.php instead of using wpsc_query.php . I’m confused now .

    Please help

    Plugin Author Justin Sainton


    In regards to your payment gateway integration, you should never be touching the database directly to get the product_id, but the $wpsc_cart global containing the product. The product ID is going to be the post_ID, as products are custom post types, stored in the wp_posts table.

    There is some limited documentation on creating your own payment gateway here –

    However, the best thing to do would probably be to look at, learn what each method is doing, and apply the Helcim API to each of those methods in a new payment gateway file.

    thanxs Justin Sainton ,

    everything is going good except one thing , when I click on checkbox on cart page(Shipping Address same as Billing Address?) then $wpsc_cart->cart_items gets empty thats why transaction fails but without clicking on that checkbox everything goes fine . Thats why I was getting that error what I had mentioned in my first post .

    Plugin Author Justin Sainton


    It’s going to be quite difficult to help you without some further consultation – I can assure you, though, checking Shipping same as Billing doesn’t cause that result with any of the other gateways I’ve used personally, so it’s got to be something in the gateway, theme, or another plugin conflicting.

    I’d be happy to help if you want to shoot me an email.

    Plugin Author Justin Sainton


    Alternatively, any of the consultants at could likely help.

    I have found one thing , when I check that checkbox it post data using jquery to another page

    var data = {
    action: ‘wpsc_shipping_same_as_billing’,
    wpsc_shipping_same_as_billing: true
    };, data, function(response) {

    and wpsc_shipping_same_as_billing:false when I uncheck the checkbox . But in both cases its response is 0 . I’m unable to figure it out that why this is being used, so would there be any kind of trouble if I comment this out because after commenting this everything is working fine.

    and sir it would be my pleasure to have any kind of support from you .
    this is my email id


Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: WP e-Commerce] How to add new Payment Gateway ?’ is closed to new replies.