Php 取消贝宝定期付款

Php 取消贝宝定期付款,php,codeigniter,paypal,payment-gateway,Php,Codeigniter,Paypal,Payment Gateway,我目前正在我的网站中集成paypal定期付款流程。在我的网站中,用户可以选择取消其paypal定期付款。我有每个用户的payer\u id和payer\u电子邮件。是否可以使用这些详细信息取消定期付款。如果否,如果特定用户单击“从我的网站取消定期付款”,我如何取消“定期付款”选项 谢谢。您可以使用ManagerRecurringPaymentsProfileStatus API暂停或取消配置文件 注意。这是专门为快速结帐,但它将为其他贝宝集成工作 这里也回答了这个问题,供将来参考:您可以使用Ma

我目前正在我的网站中集成paypal定期付款流程。在我的网站中,用户可以选择取消其paypal定期付款。我有每个用户的payer\u id和payer\u电子邮件。是否可以使用这些详细信息取消定期付款。如果否,如果特定用户单击“从我的网站取消定期付款”,我如何取消“定期付款”选项


谢谢。

您可以使用ManagerRecurringPaymentsProfileStatus API暂停或取消配置文件

注意。这是专门为快速结帐,但它将为其他贝宝集成工作


这里也回答了这个问题,供将来参考:

您可以使用ManageRecurringPaymentsProfileStatus API挂起或取消配置文件

注意。这是专门为快速结帐,但它将为其他贝宝集成工作


这里也回答了这个问题,以供将来参考:

您可以使用profile\u ID取消所有paypal定期配置文件。并使用您的定期支付配置文件ID执行此代码。希望这对您有所帮助

<?php
$curl = curl_init();

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_URL, 'https://api-3t.sandbox.paypal.com/nvp');
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query(array(
    'USER' => 'XXXXXXXXXXX',  //Your API User
    'PWD' => 'XXXXXXXXXXXXX',  //Your API Password
    'SIGNATURE' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXX',   //Your API Signature

    'VERSION' => '108',
    'METHOD' => 'ManageRecurringPaymentsProfileStatus',
    'PROFILEID' => 'I-315LHdijsju',         //here add your profile id                      
    'ACTION'    => 'Cancel' //this can be selected in these default paypal variables (Suspend, Cancel, Reactivate)
)));

$response =    curl_exec($curl);

curl_close($curl);

$nvp = array();

if (preg_match_all('/(?<name>[^\=]+)\=(?<value>[^&]+)&?/', $response, $matches)) {
    foreach ($matches['name'] as $offset => $name) {
        $nvp[$name] = urldecode($matches['value'][$offset]);
    }
}

printf("<pre>%s</pre>",print_r($nvp, true));

您可以使用profile\u ID取消所有paypal定期付款配置文件。并使用您的定期付款配置文件ID执行此代码。希望这对您有所帮助

<?php
$curl = curl_init();

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_URL, 'https://api-3t.sandbox.paypal.com/nvp');
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query(array(
    'USER' => 'XXXXXXXXXXX',  //Your API User
    'PWD' => 'XXXXXXXXXXXXX',  //Your API Password
    'SIGNATURE' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXX',   //Your API Signature

    'VERSION' => '108',
    'METHOD' => 'ManageRecurringPaymentsProfileStatus',
    'PROFILEID' => 'I-315LHdijsju',         //here add your profile id                      
    'ACTION'    => 'Cancel' //this can be selected in these default paypal variables (Suspend, Cancel, Reactivate)
)));

$response =    curl_exec($curl);

curl_close($curl);

$nvp = array();

if (preg_match_all('/(?<name>[^\=]+)\=(?<value>[^&]+)&?/', $response, $matches)) {
    foreach ($matches['name'] as $offset => $name) {
        $nvp[$name] = urldecode($matches['value'][$offset]);
    }
}

printf("<pre>%s</pre>",print_r($nvp, true));

此代码在第一次运行时为我工作。只需更改参数。此代码在第一次运行时为我工作。换个参数就行了。