如何更改定期付款交易的信用卡号?

时间:2013-05-17 15:36:54

标签: php paypal

我已在我的网站上实施了定期付款交易,  现在,我的客户希望通过提交付款ID(从CreateRecurringPaymentsProfile找到)来更改该定期交易的信用卡号。所以我的问题是,是否有任何API(php)到update an credit card number定期付款交易。

2 个答案:

答案 0 :(得分:1)

答案 1 :(得分:0)

这是对我有用的确切代码......

$URPDetails = new UpdateRecurringPaymentsProfileRequestDetailsType();
    $UpdateRecurringPaymentsProfileRequestTypeObj = new UpdateRecurringPaymentsProfileRequestType();
    $UpdateRecurringPaymentsProfileRequestTypeObj->UpdateRecurringPaymentsProfileRequestDetails=$URPDetails;

    $UpdateRecurringPaymentsProfileReqObj = new UpdateRecurringPaymentsProfileReq();
    $UpdateRecurringPaymentsProfileReqObj->UpdateRecurringPaymentsProfileRequest=$UpdateRecurringPaymentsProfileRequestTypeObj;
    $paypalService = new PayPalAPIInterfaceServiceService();

        try {
            /* wrap API method calls on the service object with a try catch */
            $createRPProfileResponse = $paypalService->UpdateRecurringPaymentsProfile($UpdateRecurringPaymentsProfileReqObj);   
        } catch (Exception $ex) {
            echo 'ERROR: '.$e->getMessage()."\n";
            //exit;
        }

其中$URPDetails对象包含Credit Card DetailsProfileId