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