Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/234.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 贝宝自定义字段_Php_Paypal_Paypal Ipn - Fatal编程技术网

Php 贝宝自定义字段

Php 贝宝自定义字段,php,paypal,paypal-ipn,Php,Paypal,Paypal Ipn,现在使用Paypal,我们没有很多自定义字段,只有一个标准的IPN接收文件,这意味着我们必须将即时付款通知拆分为多个,然后发送到申请网站 现在,我正在考虑对自定义字段执行此操作。 基本上,我发布了一个带有websitename和customer_id_编号的自定义值,通过示例可以显示为:“Website12345”。 现在转移网站名称很容易,因为我可以为类似的内容制作多个“如果”和“如果”: if ($custom == 'website1%') {} 但是现在我当然想换掉客户id号,在这个例

现在使用Paypal,我们没有很多自定义字段,只有一个标准的IPN接收文件,这意味着我们必须将即时付款通知拆分为多个,然后发送到申请网站

现在,我正在考虑对自定义字段执行此操作。 基本上,我发布了一个带有websitename和customer_id_编号的自定义值,通过示例可以显示为:“Website12345”。 现在转移网站名称很容易,因为我可以为类似的内容制作多个“如果”和“如果”:

if ($custom == 'website1%') {}
但是现在我当然想换掉客户id号,在这个例子中是12345。 通过示例键入如下内容:

$customer_id_number = somewaytoshiftthenumberout;
有没有一种特殊的技巧可以帮我找到正确的方向


提前谢谢

我建议您使用
explode

编写website1 | | 12345示例,并使用:

$custom_exploded = explode('||', $custom);
if ($custom_exploded[0] == 'website1')
    // insert in DB $custom_exploded[1]

我理解你的意思,但我现在仍然不知道如何获取客户ID号,除了做if($custom_exploded[0]=='00001一个无止境的数字')。还是我看错了?使用
explode
时,客户ID位于
$custom\u explode[1]
中。