简体   繁体   English

如何在Laravel 5.6中更新Braintree付款依赖关系?

[英]How to Update Braintree payment dependency in Laravel 5.6?

I am working with Laravel 5.6 and using Braintree payment gateway sand box. 我正在使用Laravel 5.6并使用Braintree付款网关沙盒。 but when I update my php version it is encounters some error. 但是,当我更新我的php版本时,遇到了一些错误。 like this 像这样

Function create_function() is deprecated
in Util.php line 206
at HandleExceptions->handleError(8192, 'Function create_function() is deprecated', 'C:\\Users\\mala\\Desktop\\ddddd\\vendor\\braintree\\braintree_php\\lib\\Braintree\\Util.php', 206, array('string' => 'client_token', 'delimiter' => '-', 'callbacks' => array()))in Util.php line 206 

so, I am using braintree vertion, ``` "oureastudios/laravel5-braintree": "dev-master" `` but when I search in internet most people suggested update braintree dependancy to v3.26.0. 因此,我正在使用braintree版本,```“ oureastudios / laravel5-braintree”:“ dev-master”,但是当我在互联网上搜索时,大多数人建议将braintree依赖性更新为v3.26.0。 then My problem is how can I update My current braintree to above new vertion? 那么我的问题是如何将我当前的大脑树更新为新版本?

create_function is deprecated in PHP 7.2 PHP 7.2中不推荐使用create_function

in the file /Braintree/Util.php the function delimiterToCamelCase 在文件/Braintree/Util.php中,函数delimiterToCamelCase

Use: 采用:

$callback = function ($matches) {
                return strtoupper($matches[1]);
            };

instead of: 代替:

$callback = create_function('$matches', 'return strtoupper($matches[1]);');

Link Reference: https://github.com/braintree/braintree_php/commit/37e54736ef949cc022a3f87a9fed53820b798c3e 链接参考: https : //github.com/braintree/braintree_php/commit/37e54736ef949cc022a3f87a9fed53820b798c3e

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM