WordPress.org

Ready to get started?Download WordPress

Forums

WP eCommerce
[resolved] [Plugin: WP e-Commerce] How to add new Payment Gateway ? (8 posts)

  1. manu1222
    Member
    Posted 2 years ago #

    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 ?

    Thanxs,
    Manu

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

  2. manu1222
    Member
    Posted 2 years ago #

    <input type="hidden" value="<?php echo wpsc_the_product_id(); ?>" name="product_id"/>

    wp-e-commerce/wpsc-theme/wpsc-products_page.php

    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
    Thanks

  3. manu1222
    Member
    Posted 2 years ago #

    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
    Thanxs

  4. Justin Sainton
    Member
    Plugin Author

    Posted 2 years ago #

    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 -

    http://getshopped.org/resources/docs/get-involved/writing-a-new-payment-gateway/

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

  5. manu1222
    Member
    Posted 2 years ago #

    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 .

  6. Justin Sainton
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  7. Justin Sainton
    Member
    Plugin Author

    Posted 2 years ago #

    Alternatively, any of the consultants at http://getshopped.org/resources/wp-consultants/developers/ could likely help.

  8. manu1222
    Member
    Posted 2 years ago #

    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
    };
    jQuery.post(wpsc_ajax.ajaxurl, 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 vipul.netpyx@gmail.com

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic