您未被授权查看此页面。该交易尚未被处理

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了您未被授权查看此页面。该交易尚未被处理相关的知识,希望对你有一定的参考价值。

我必须将CyberSource支付网关与laravel集成。当我点击结账时,显示以下错误。

**You are not authorized to view this page. The transaction has not been processed.
If the problem persists please report your problem and quote the following Error Reference Number:
E-5EFB6D6C58554846ACC1CB9CB1D82558**

这是我提交的表格



     $request_form_data = [
                        "access_key" => $this->access_key,
                        "profile_id" => $this->profile_id,
                        "transaction_type" => $this->transaction_type,
                        "reference_number" => $this->reference_number,
                        "amount" => $this->amount,
                        "locale" => $this->locale,
                        "transaction_uuid" =>$this->transaction_uuid,
                        "signed_date_time" => $this->signed_date_time,
                        "signed_field_names" => "access_key,profile_id,transaction_type,reference_number,amount,locale,transaction_uuid,signed_date_time,currency",
                        "unsigned_field_names" => "",
                        "currency" => $this->currency,
                        "signature" => $this->signature,

                    ];

                    $this->signature = $this->makeSignature($request_form_data);
                    $request_form_data["signature"] = $this->signature;
                    $log_data = ["ACTION" => "PAYMENT REQUEST", "FULL_REQUEST" => $request_form_data];
                    $this->apiLog($log_data);

                    echo '
                        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                        <html xmlns="http://www.w3.org/1999/xhtml">
                            <head>
                                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                                <title>ShayInt Payment</title>
                            </head>
                            <body>
                                <h1 align="center">Processing your Transaction</h1>
                                <form method="post" action="' . $this->pay_url . '" name="checkout_form" style="display:none;"> 
                                    <div align="center">
                                        <input id="access_key" type="hidden" value="' . $this->access_key . '" name="access_key">
                                        <input id="profile_id" type="hidden" value="' . $this->profile_id . '" name="profile_id">
                                        <input id="transaction_type" type="hidden" value="' . $this->transaction_type . '" name="transaction_type">
                                        <input id="reference_number" type="hidden" value="' . $this->reference_number . '" name="reference_number">
                                        <input id="amount" type="hidden" value="' . $this->amount . '" name="amount" >
                                        <input id="locale" type="hidden" value="' . $this->locale . '" name="locale" >
                                        <input id="transaction_uuid" type="hidden" value="' . $this->transaction_uuid . '" name="transaction_uuid">
                                        <input id="signed_date_time" type="hidden" value="' . $this->signed_date_time . '" name="signed_date_time" >
                                        <input id="signed_field_names" type="hidden" value="' . $this->signed_field_names . '" name="signed_field_names" >
                                        <input id="unsigned_field_names" type="hidden" value="' . $this->unsigned_field_names . '" name="unsigned_field_names" >
                                        <input id="currency" type="hidden" value="' . $this->currency . '" name="currency" >
                                        <input id="signature" type="hidden" value="' . $this->signature . '" name="signature">                               
                                        <h3 align="center"> Please click on the Submit button to continue processing.<br>
                                        <input type="submit" value="Submit">
                                    </div>
                                </form>
                                <script>document.forms["checkout_form"].submit();</script>
                            </body>
                        </html>
    ```

**You are not authorized to view this page. The transaction has not been processed.
If the problem persists please report your problem and quote the following Error Reference Number:
E-5EFB6D6C58554846ACC1CB9CB1D82558**
答案
 public function proceedPaymentHNB(Request $request)


    $order_id = $request->input("order_id");
    $order = Order::where("id", $order_id)->first();

    if ($order_id != null && $order != null) 

        $transaction_ref = $this->addTransactionEntry($order_id);
        if ($transaction_ref != null) 
            // Transaction  created
            $this->reference_number = $transaction_ref;
            $this->amount = $order->total_amount;
            $this->bill_to_address_line1 = $order->delivery_address;
            $this->bill_to_address_city = $order->delivery_city;
            $this->bill_to_address_country = $order->delivery_country_code;
            $this->bill_to_address_postal_code = $order->delivery_delivery_zip_code;
            $this->bill_to_forename = $order->user->user_first_name;
            $this->bill_to_surname = $order->user->user_last_name;
            $this->bill_to_email = $order->user->user_email;
            $this->bill_to_phone = $order->user->user_mobile;
            $this->signed_date_time = Carbon::now()->toIso8601ZuluString(); //Carbon::now()->format("Y-m-dTh:i:sZ");
            $this->transaction_uuid = APIHelper::generateRandomString(30);

            $request_form_data = [
                "access_key" => $this->access_key,
                "profile_id" => $this->profile_id,
                "transaction_type" => $this->transaction_type,
                "reference_number" => $this->reference_number,
                "amount" => $this->amount,
                "locale" => $this->locale,
                "transaction_uuid" => $this->transaction_uuid,
                "signed_date_time" => $this->signed_date_time,
                "signed_field_names" => $this->signed_field_names,
                "unsigned_field_names" => "",
                "currency" => $this->currency,
                "payment_method" => $this->payment_method,
                "bill_to_forename" => $this->bill_to_forename,
                "bill_to_surname" => $this->bill_to_surname,
                "bill_to_email" => $this->bill_to_email,
                "bill_to_phone" => $this->bill_to_phone,
                "bill_to_address_line1" => $this->bill_to_address_line1,
                "bill_to_address_city" => $this->bill_to_address_city,
                "bill_to_address_country" => $this->bill_to_address_country,
                "bill_to_address_postal_code" => $this->bill_to_address_postal_code,
            ];

            $this->signature = $this->makeSignature($request_form_data);
            $request_form_data["signature"] = $this->signature;

            $log_data = ["ACTION" => "PAYMENT REQUEST", "FULL_REQUEST" => $request_form_data];
            $this->apiLog($log_data);

            echo '
                <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                <html xmlns="http://www.w3.org/1999/xhtml">
                    <head>
                        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                        <title>ShayInt Payment</title>
                    </head>
                    <body>
                        <h1 align="center">Processing your Transaction</h1>
                        <form method="post" action="' . $this->pay_url . '" name="checkout_form" style="display:none;"> 
                            <div align="center">
                                <input id="access_key" type="hidden" value="' . $this->access_key . '" name="access_key">
                                <input id="profile_id" type="hidden" value="' . $this->profile_id . '" name="profile_id">
                                <input id="transaction_type" type="hidden" value="' . $this->transaction_type . '" name="transaction_type">
                                <input id="reference_number" type="hidden" value="' . $this->reference_number . '" name="reference_number">
                                <input id="amount" type="hidden" value="' . $this->amount . '" name="amount" >
                                <input id="locale" type="hidden" value="' . $this->locale . '" name="locale" >
                                <input id="transaction_uuid" type="hidden" value="' . $this->transaction_uuid . '" name="transaction_uuid">
                                <input id="signed_date_time" type="hidden" value="' . $this->signed_date_time . '" name="signed_date_time" >
                                <input id="signed_field_names" type="hidden" value="' . $this->signed_field_names . '" name="signed_field_names" >
                                <input id="unsigned_field_names" type="hidden" value="' . $this->unsigned_field_names . '" name="unsigned_field_names" >
                                <input id="currency" type="hidden" value="' . $this->currency . '" name="currency" >
                                <input id="signature" type="hidden" value="' . $this->signature . '" name="signature">
                                <input id="payment_method" type="hidden" value="' . $this->payment_method . '" name="payment_method">
                                <input id="bill_to_forename" type="hidden" value="' . $this->bill_to_forename . '" name="bill_to_forename">
                                <input id="bill_to_surname" type="hidden" value="' . $this->bill_to_surname . '" name="bill_to_surname">
                                <input id="bill_to_email" type="hidden" value="' . $this->bill_to_email . '" name="bill_to_email">
                                <input id="bill_to_phone" type="hidden" value="' . $this->bill_to_phone . '" name="bill_to_phone">
                                <input id="bill_to_address_city" type="hidden" value="' . $this->bill_to_address_city . '" name="bill_to_address_city">                                    
                                <input id="bill_to_address_line1" type="hidden" value="' . $this->bill_to_address_line1 . '" name="bill_to_address_line1">                              
                                <input id="bill_to_address_country" type="hidden" value="' . $this->bill_to_address_country . '" name="bill_to_address_country">
                                <input id="bill_to_address_postal_code" type="hidden" value="' . $this->bill_to_address_postal_code . '" name="bill_to_address_postal_code">

                                <h3 align="center"> Please click on the Submit button to continue processing.<br>
                                <input type="submit" value="Submit">
                            </div>
                        </form>
                        <script>document.forms["checkout_form"].submit();</script>
                    </body>
                </html>


                ';
         else 
            // Transaction not created
            Log::critical("Transaction not created for oder_id=" . $order_id);
            return redirect()->to(web_base_path('show-payment-response?result=error'));
        
     else 
        // Invalid order id
        Log::critical("Invalid order id - oder_id=" . $order_id);
        return redirect()->to(web_base_path('show-payment-response?result=error'));
    


public function getPaymentGatewayResponseHNB(Request $request)
   
    $ResponseCode = $request->input('decision');
    $ReasonCode = $request->input('reason_code');
    $ReasonCodeDesc = $request->input('message');
    $

以上是关于您未被授权查看此页面。该交易尚未被处理的主要内容,如果未能解决你的问题,请参考以下文章

什么是URL?

以太坊交易在 750 秒内未被挖掘

CISP/CISA 每日一题 七

在Windows Server 2003 的IIS6.0发布网站出现401错误

生成信用卡交易授权码的指南

区块链比特币学习 - 4 - 交易池