• Resolved Marco1970

    (@marco1970)


    Hi,

    since I am selling ONLY virtual products, I was expecting all my payments to be captured immediately, and the orders completed automatically.

    But that does not happen, orders are put on hold and I need to capture from back end ;-(

    Is that a bug? The plugin docs states that: “There is an exception for orders where all items are both virtual and downloadable: These are not considered to need processing and will be captured automatically (and go directly to the ‘Complete’ status).”

    Or am I missing something?

    I am using plugin version 1.2.3, and I swear I remember in previous versions a setting where I could force capture. But that is no longer there. I tried to use the setting to force the order status to ‘Processing’ instead of ‘On Hold’, but that does not trigger automatic capture.

    Should I maybe use the filter ‘woo_vipps_captured_statues’ to return ‘waiting’ and/or ‘on-hold’ as statuses for which Vipps should try a capture when transitioning to them?

    Thanks in advance for any help

    M

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter Marco1970

    (@marco1970)

    FYI, just grep, and it looks like ‘woo_vipps_captured_statues’ filter is no longer in the code base, only in the readme.txt ;-(

    m

    Plugin Author Iver Odin Kvello

    (@iverok)

    Right, that’s a typo. The actual filter is

    woo_vipps_captured_statuses

    But that’s not the issue here; that would be for a custom status that some stores use.

    As stated in the documentation, the standard behaviour for Woo is to consider the order not in need of ‘processing’ if it is _both_ virtual _and_ downloadable. The order can then be captured, because delivery happens without further processing, ie, at once.

    Are your products marked like that? If so, your order should be captured and marked as ‘complete’. If your products are just marked “virtual”, it means they don’t require shipping, but they may need some other form of processing before they are ‘delivered’ or ‘being delivered’ (at which point you can capture).

    If your orders aren’t actually ‘downloadable’, but still do not need processing (and are delivered as soon as the payment is complete), you can either mark them ‘downloadable’ anyway if the result doesn’t look too weird, or you will have to modify another filter in woocommerce. This is

    woocommerce_order_item_needs_processing

    This filter takes a truth value (defaulting to true iff downloadable and virtual), the product object and an order ID. You would here return true for your products that do not need processing.

    If none of your order items needs processing, the order will be set to ‘completed’ by default, and the payment will be captured. You can change this to ‘processing’ if you want by using another filter,

    woocommerce_payment_complete_order_status

    The order would still be captured though.

    If you have some products that do need processing and some that don’t it’s probably easiest to add a checkbox for “needs processing” directly on the product page.

    Thank you for reporting the error in the documentation, this will be fixed next release.

    Thread Starter Marco1970

    (@marco1970)

    Hi Iverok,

    got your reply via mail, even though I cannot see it here ?? Thanks, super explanation, very useful!!

    I gave it a thought, and it might be that the 2-step reserve – capture is actually a good thing. So I tried to capture the payment from the back end order page by clicking on the Vipps Capture button , but got these error messages:

    Kunne ikke belaste Vippsbetalingen for ordreid: 183 400 Transaction Text is too long

    Avfei denne meldingen.
    Kunne ikke belaste Vipps-betalingen – status satt til on-hold

    Any idea? Which ‘Transaction Text’ are we referring to?

    TY again

    m

    Plugin Author Iver Odin Kvello

    (@iverok)

    My reply is being held for moderation because I edited it to fix a typo. It will probably appear here shortly.

    Unfortunately, this problem is a bit worse. The transaction text is

    “The transaction text is mandatory, and is displayed to end user in Vipps.”

    In the plugin, it is coded as

    $transaction['transactionText'] = __('Order capture for order','woo-vipps') . ' ' . $orderid . ' ' . home_url();

    I assume your home_url() is something like
    https://clarionhotelosloairportbetaling.tidbitglobal.com/ ?

    Apparently this reaches some kind of limit which I have not been able to find in Vipps’ API documentation.

    Unfortunately there is no filter here to modify this string. You can if you want to modify line 218 in the file VippsApi.class.php and replace “home_url()” with a shorter string identifying your shop. I’ll add some protection here ASAP.

    Thread Starter Marco1970

    (@marco1970)

    Ah,

    yeah, sorry, not a API-friendly use of subdomain names on my part… OK, good to know, will try to fix with what you suggested.

    but if I may: would it be too much to ask to add an official filter for that? so that I can use the filter instead of changing Vipps plugin code, thus avoiding all the updates-related nightmares the latter implies..

    I know one request is not enough to change the core, but maybe other have same issue?

    TY for all

    m

    Plugin Author Iver Odin Kvello

    (@iverok)

    Yes, I’m adding a filter to allow you to change the ‘shop id’, 'woo_vipps_transaction_text_shop_id' . I will also add errorhandling to the code in question so it stays within the limit, which appears to be 100.

    The next version will be officially released monday, but I’ll post it to github (the ‘master’ branch) as soon as I’m done, that is to https://github.com/vippsas/vipps-woocommerce.

    Thread Starter Marco1970

    (@marco1970)

    AWESOME

    thanks a million!!!!

    Plugin Author Iver Odin Kvello

    (@iverok)

    The new version is on

    https://github.com/vippsas/vipps-woocommerce , branch master

    now. It will be released on wp.org monday. I’ve tested success and failure branches; it should be relatively safe. For your application it is probably best to use the shop ID filter, but if you don’t , the transaction text will be limited to 100 chars using two approaches.

    Thank you for reporting the bug and sorry for the inconvenience.

    Thread Starter Marco1970

    (@marco1970)

    Thanks to you!!!

    Thread Starter Marco1970

    (@marco1970)

    Hi,

    updated plugin, thanks for fix and mention ??

    m

    Hi, Im’ struggling to find a solutions for the following:

    We basically have one downloadable, virtual product of which we have
    several (1000’s) unique file from. Each file has its unique serial no and there is only one copy of each file.

    We would like to display it in our shop as one single ‘generic’ product . Clients
    can then add 1 or several copies of this product to their cart.

    The download links that they receive are all, unique single files holding a unique serial no.

    We have tried setting up a single product with many copies and adding
    the download links but when a customer even buys just only a single
    copy, he can download all the other links as well.

    We have tried to work with an attribute and then each file in a variations but in the cart the customer can not choose several products. in another setting he could but when receiving the download files there was only one file and not the amount he chose.

    Many thanks in advance!

    Plugin Author Iver Odin Kvello

    (@iverok)

    I’m not sure if this is a Vipps-specific request?

    If I get this correctly you have a Variable product where the download file is the variation. This is supported as far as I can tell in WooCommerce,

    Variable products can also have downloadable variations. When adding a variation tick the Downloadable checkbox and more options appear.

    – but managing thousands of variations may be an issue.

    Maybe you could model the files internally as separate simple (virtual, downloadable) products, and rather replace the front end with a single page taking the place of the generic product. I’m sorry I can’t be of any more help.

    HI Iverok,

    Thank you for your fast reply.

    I see now that it went into the wrong forum thread.Sorry about that.
    we have tried with a simple product it would create to many of them. It should really look as a single product on the front end with a feed of original files from the back.

    In any case thank you for answer!

    Plugin Author Iver Odin Kvello

    (@iverok)

    Marking this as resolved.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Reserve vs Capture’ is closed to new replies.