Exemple #1
0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
//Point to the correct directory
chdir("..");
//Include all the required files
require_once 'library/googlecart.php';
require_once 'library/googleitem.php';
require_once 'library/googleshipping.php';
require_once 'library/googletaxrule.php';
require_once 'library/googletaxtable.php';
//Invoke any of the provided use cases
UseCase1();
//UseCase2();
//UseCase3();
function UseCase1()
{
    //Create a new shopping cart object
    $merchant_id = "";
    //Your Merchant ID
    $merchant_key = "";
    //Your Merchant Key
    $server_type = "sandbox";
    $cart = new GoogleCart($merchant_id, $merchant_key, $server_type);
    //Add items to the cart
    $item1 = new GoogleItem("MegaSound 2GB MP3 Player", "Portable MP3 player - stores 500 songs", 1, 178);
    $item2 = new GoogleItem("AA Rechargeable Battery Pack", "Battery pack containing four AA rechargeable batteries", 1, 12);
    $cart->AddItem($item1);
	</tr>

	

			

	

	<tr>

		<!--<td width="7%">&nbsp;</td>-->

		<td align="center" colspan="2">

		<?php 
UseCase1($google_id, $google_key, $sandbox, $_SESSION['SESS_orderid'], $check_shipping_enable, $hide_shipping_division);
?>

		</td>

	</tr>

	</table>

		

	</div>