Jump to content

Integration of shipping details in payment gateway


Recommended Posts


I believe there is no solution for this problem, but I am still raising it, just in case there is actually one, or in case Cubecart is interested in developping it.

After discussing with the payment provider of the gateways I developped (Systempay), for their fraud assessment policy, they asked me to input:

  • The shipping provider (that's easy, I get it from basket['shipping']['product']
  • But they also want a couple of structured data, and I wonder whether Cubecart offers a standard for that:
    • Shipping type (which can be "delivery at address", "delivery at pick-up point", "claim in store", etc.)
    • Shipping speed (which is PRIORITY, EXPRESS or STANDARD, depending on whether the delivery is the same day, within 2 working days, or longer)
    • Shipping delay (which in the case the shipping speed is PRIORITY) defines how fast the delivery is (immediate, less than one hour, more than one hour)

I absolutely understand that, to enable such a mapping, I would need the shipping modules to fill in that information (if it exists). But my immediate question is rather whether Cubecart has any solution, should the shipping modules wish to support the above?



Link to comment
Share on other sites

I don't recall any kind of standard structured data for a solution to these shipping details.

Shipping Type: there is a store setting on the Features tab, Misc section, "Allow delivery to non-invoice address". This would be available at:


Taking into account this setting, your structured data item could reflect where the item is allowed to go. Comparing the billing address against the delivery address would indicate that the customer chose to deliver to a possible third-party location. Then there is whether you allow for in-store pick-up, etc.

Shipping Speed: That data item would depend on the shipping module used. If those words are contained in the basket['shipping']['product'], you can use strpos() to try to find them.

Shipping Delay: Your shipper's Rate Request API might send back a lot of information. For example, (last I looked) the USPS sent back estimated shipping times for the myriad services it provides.

Link to comment
Share on other sites

I could do what you recommend for shipping_type indeed. For shipping_speed and shipping_delay, I belive I do not really want to have anything specific to a given shipping company, in the payment gateway.

I believe an interesting improvement in Cubecart would be either:

  • to allow, for a given payment gateway a setting (say: shipping_speed) which could be instantiated on each and every shipping product
  • or to allow defining such standard settings (shipping_speed, shipping_delay, etc. but not sure everyone needs the same as I do, maybe expected_delivery_datetime would sound better) so that the shipping module could fill it in and the payment gateway module could read it
Link to comment
Share on other sites

"I do not really want to have anything specific to a given shipping company, in the payment gateway."

Ah! Of course.

If we can't determine with any accuracy what any given shipper can promise for shipping delivery characteristics, maybe we can state generally, on a per-product basis, that "This product could take 3-5 business days to arrive." where '3-5' is settable per product.

The gateway module can iterate across the basket contents and use the largest shipping time found.


Link to comment
Share on other sites

I have a plugin "Additional Product Fields". So, this would be a specific solution for you as opposed to a general incorporation of this feature in CubeCart's core code.

The added product fields can be whatever you want. One field for the minimum and a second for the maximum, or a single field for a specifically formatted 'range'.


  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...