• <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 加密多项目自定义购物车动态结账按钮

        PayPal - encrypt muti item custom cart dynamic checkout button with php(PayPal - 使用 php 加密多项目自定义购物车动态结账按钮)
          <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 加密多项目自定义购物车动态结账按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                    <tbody id='c38h2'></tbody>

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

                    1. <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>
                    2. <legend id='c38h2'><style id='c38h2'><dir id='c38h2'><q id='c38h2'></q></dir></style></legend>
                    3. <tfoot id='c38h2'></tfoot>

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