【问题标题】:How to include order information in Quickbooks' Hosted Paypage?如何在 Quickbooks 的托管支付页面中包含订单信息?
【发布时间】: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


    【解决方案1】:

    重读文档后,我发现我错过了 URL 中的“Order=”。我删除了 json_decode 行,然后将“'Order' => $order”添加到我的 $ticket 数组的末尾。这让它工作了。

    $ticket = array(
                    'AuthModel'     =>  'desktop',
                    'AppLogin'      =>  'xxxx',
                    'AuthTicket'    =>  'xxxx',
                    'TxnType'       =>  'Sale',
                    'Amount'        =>  $Amount,
                    'CustomerName'  =>  $CustomerFullName,
                    'CustomerStreet'=>  $CustomerStreet,
                    'CustomerCity'  =>  $CustomerCity,
                    'CustomerState' =>  $CustomerState,
                    'CustomerPostalCode'=> $CustomerPostalCode,
                    'IsCustomerFacing' => '1', 
                    'Order'         =>  $order
                    );
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-02-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-21
      • 1970-01-01
      • 2021-11-03
      • 2017-06-24
      相关资源
      最近更新 更多