A code snippet for using the Google Distance Matrix and Places APIs to calculate the distance between two places. The basics for this part of the code was adapted from Stack Overflow.
Once the distance has been calculated, the applicable delivery cost (shipping rate) is shown to the end user.