【发布时间】:2014-06-03 15:08:16
【问题描述】:
我正在使用Quickbooks' Hosted Paypage,到目前为止,除了订单信息之外,我已经设法让一切正常工作。我没有收到任何错误。无论有没有订单相关代码,支付页面都可以继续工作。
我不确定该怎么做,也找不到任何相关的例子。我假设我的格式不正确,但我不知道 what 如果我是。
下面是相关代码。我拿出了applogin和authticket,但这些都是正确的。
<?php
$order = '{"Items":[
{"ItemSku":"NA","ItemDesc":"Party Hats","ItemPrice":"1.00","ItemQty":"1","ItemIsShippable":"0","ItemIsTaxable":"0"},
{"ItemSku":"NA","ItemDesc":"Extra Guests","ItemPrice":"1.08","ItemQty":"1","ItemIsShippable":"0","ItemIsTaxable":"0"}],
"EstDeliveryDate": "01/01/2080"}';
// I've tried with and without this line
$order = json_decode($order, true);
/*---------------------------------------
Paypage
---------------------------------------*/
if ($NoErrors = true) {
// Intuit Base URL
$base_url = 'https://paymentservices.intuit.com/';
// Construct URL for Intuit ticket
$ticket = array(
'AuthModel' => 'desktop',
'AppLogin' => 'xxx.xxx.com',
'AuthTicket' => 'xxx-xxx-xxxx',
'TxnType' => 'Sale',
'Amount' => $Amount,
'CustomerName' => $CustomerFullName,
'CustomerStreet'=> $CustomerStreet,
'CustomerCity' => $CustomerCity,
'CustomerState' => $CustomerState,
'CustomerPostalCode'=> $CustomerPostalCode,
'IsCustomerFacing' => '1'
);
array_push($ticket, $order);
// Go to Intuit ticket URL
$ticket_url = $base_url . "paypage/ticket/create?" . http_build_query($ticket);
$print_ticket = file_get_contents($ticket_url);
感谢您的宝贵时间!
【问题讨论】:
标签: php quickbooks intuit-partner-platform intuit