• <i id='CJJtJ'><tr id='CJJtJ'><dt id='CJJtJ'><q id='CJJtJ'><span id='CJJtJ'><b id='CJJtJ'><form id='CJJtJ'><ins id='CJJtJ'></ins><ul id='CJJtJ'></ul><sub id='CJJtJ'></sub></form><legend id='CJJtJ'></legend><bdo id='CJJtJ'><pre id='CJJtJ'><center id='CJJtJ'></center></pre></bdo></b><th id='CJJtJ'></th></span></q></dt></tr></i><div id='CJJtJ'><tfoot id='CJJtJ'></tfoot><dl id='CJJtJ'><fieldset id='CJJtJ'></fieldset></dl></div>
    <legend id='CJJtJ'><style id='CJJtJ'><dir id='CJJtJ'><q id='CJJtJ'></q></dir></style></legend>

        • <bdo id='CJJtJ'></bdo><ul id='CJJtJ'></ul>

        <small id='CJJtJ'></small><noframes id='CJJtJ'>

      1. <tfoot id='CJJtJ'></tfoot>

        PayPal - 使用 php 加密多项目自定义购物车动态结账按钮

        时间:2023-06-23
          <legend id='w3yuC'><style id='w3yuC'><dir id='w3yuC'><q id='w3yuC'></q></dir></style></legend>

              <bdo id='w3yuC'></bdo><ul id='w3yuC'></ul>
                <tbody id='w3yuC'></tbody>

            • <small id='w3yuC'></small><noframes id='w3yuC'>

                <i id='w3yuC'><tr id='w3yuC'><dt id='w3yuC'><q id='w3yuC'><span id='w3yuC'><b id='w3yuC'><form id='w3yuC'><ins id='w3yuC'></ins><ul id='w3yuC'></ul><sub id='w3yuC'></sub></form><legend id='w3yuC'></legend><bdo id='w3yuC'><pre id='w3yuC'><center id='w3yuC'></center></pre></bdo></b><th id='w3yuC'></th></span></q></dt></tr></i><div id='w3yuC'><tfoot id='w3yuC'></tfoot><dl id='w3yuC'><fieldset id='w3yuC'></fieldset></dl></div>
                  <tfoot id='w3yuC'></tfoot>
                  本文介绍了PayPal - 使用 php 加密多项目自定义购物车动态结账按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我创建了一个网站,需要我构建自定义购物篮以满足业务需求.这一切正常.

                  I have created a site that required me to build a custom basket in order to meet the needs of the business. This is all working fine.

                  上周我一直在尝试制作一个加密的使用 PayPal 结账"按钮.

                  I have spent the last week trying to make an encrypted 'checkout with PayPal' button.

                  首先我尝试了这个:www.x.com/message/174366(没有超链接,因为我是新用户,抱歉),并且无法从该功能中获取任何加密数据.

                  Firstly I tried this: www.x.com/message/174366 (not hyperlinked because I'm a new user, sorry), and couldn't get any encrypted data out of the function.

                  所以我又花了一天的时间研究并发现 使用 php 加密的网络支付

                  So I spent another day researching and found Encrypted web payments with php

                  将代码自定义到我的购物篮后,它会生成加密数据.但是当点击按钮时,PayPal 只显示一个项目输入框 - 即没有任何数据被传递.

                  After customizing the code to my basket, it generates encrypted data. But when the button is clicked PayPal just shows an item input box - i.e. none of the data is passed.

                  当我注释掉向按钮添加多个项目的代码并只编码一个静态项目(即使用 item_name 而不是 item_name_1 等)时,它工作正常.

                  When I comment out the code for adding multiple items to the button and just code one static item (i.e. using item_name instead of item_name_1 etc) it works fine.

                  我曾尝试将 cmd 变量从 _s-xclick 更改为 _cart 和 _s-cart,如我遇到的某个论坛中提到的那样,但无济于事.我确实设置了上传变量.

                  I have tried to change the cmd variable from _s-xclick to _cart and _s-cart as mentioned in some forum I came across to no avail. I do have the upload variable set.

                  所以这不起作用

                  $itm=1;
                  for($j=0;$j<count($tempIArr);$j++)
                  {
                      $names[] = 'item_name_'.$itm;
                      $values[] = $tempIArr[$j]->getName();
                      $names[] = 'amount_'.$itm;
                      $values[] = $tempIArr[$j]->getTotal();
                      $itm++;
                  }
                  $paypal->addButtonParam($names, $values);
                  

                  但这确实有效

                  $names[] = 'item_name';
                  $values[] = 'someProduct';
                  $names[] = 'amount';
                  $values[] = 99;
                  $paypal->addButtonParam($names, $values);
                  

                  有人知道如何让它处理多个项目吗?

                  Anybody got any ideas on how to make it work with multiple items?

                  推荐答案

                  好的,我已经解决了.在 EncryptedButtons 类中更改

                  right, i've solved it. In the EncryptedButtons class change

                  $this->_data = "cmd=_xclick
                  "; 
                  

                  $this->_data = "cmd=_cart
                  "; 
                  

                  并添加

                  $this->_data .= "upload=1
                  ";
                  

                  记住.在最后一行的 = 之前,否则会导致错误.希望这可以帮助某人.这个项目完成后,我将写一篇博文,并在完成后添加一个链接.

                  Remember the . before the = on the last line otherwise it will lead to errors. Hope this helps someone. Once this project is finished I will be writing up a blog post and will add a link when I get it done.

                  这篇关于PayPal - 使用 php 加密多项目自定义购物车动态结账按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:paypal 创建循环配置文件,显示下一个付款日期与配置文件开始日期相同 下一篇:Paypal 使用 php curl 获取带有支付键的交易详细信息

                  相关文章

                  1. <small id='c38h2'></small><noframes id='c38h2'>

                  2. <i id='c38h2'><tr id='c38h2'><dt id='c38h2'><q id='c38h2'><span id='c38h2'><b id='c38h2'><form id='c38h2'><ins id='c38h2'></ins><ul id='c38h2'></ul><sub id='c38h2'></sub></form><legend id='c38h2'></legend><bdo id='c38h2'><pre id='c38h2'><center id='c38h2'></center></pre></bdo></b><th id='c38h2'></th></span></q></dt></tr></i><div id='c38h2'><tfoot id='c38h2'></tfoot><dl id='c38h2'><fieldset id='c38h2'></fieldset></dl></div>
                  3. <legend id='c38h2'><style id='c38h2'><dir id='c38h2'><q id='c38h2'></q></dir></style></legend>
                  4. <tfoot id='c38h2'></tfoot>

                    • <bdo id='c38h2'></bdo><ul id='c38h2'></ul>