diff --git a/sample/billing/CreatePlan.php b/sample/billing/CreatePlan.php index f5ba47b..60f4fbb 100644 --- a/sample/billing/CreatePlan.php +++ b/sample/billing/CreatePlan.php @@ -44,6 +44,9 @@ $paymentDefinition->setChargeModels(array($chargeModel)); $merchantPreferences = new MerchantPreferences(); $baseUrl = getBaseUrl(); +// ReturnURL and CancelURL are not required and used when creating billing agreement with payment_method as "credit_card". +// However, it is generally a good idea to set these values, in case you plan to create billing agreements which accepts "paypal" as payment_method. +// This will keep your plan compatible with both the possible scenarios on how it is being used in agreement. $merchantPreferences->setReturnUrl("$baseUrl/ExecuteAgreement.php?success=true") ->setCancelUrl("$baseUrl/ExecuteAgreement.php?success=false") ->setAutoBillAmount("yes") diff --git a/sample/doc/billing/CreatePlan.html b/sample/doc/billing/CreatePlan.html index 0eaad08..7e6bde3 100644 --- a/sample/doc/billing/CreatePlan.html +++ b/sample/doc/billing/CreatePlan.html @@ -23,8 +23,9 @@ You should be able to see the acceptable values in the comments.
$paymentDefinition->setChargeModels(array($chargeModel)); $merchantPreferences = new MerchantPreferences(); -$baseUrl = getBaseUrl(); -$merchantPreferences->setReturnUrl("$baseUrl/ExecuteAgreement.php?success=true") +$baseUrl = getBaseUrl();
ReturnURL and CancelURL are not required and used when creating billing agreement with payment_method as "credit_card". +However, it is generally a good idea to set these values, in case you plan to create billing agreements which accepts "paypal" as payment_method. +This will keep your plan compatible with both the possible scenarios on how it is being used in agreement.