/** * @param String $profileId Recurring payments profile ID returned in the * CreateRecurringPaymentsProfile response. Character length and * limitations: 14 single-byte alphanumeric characters. 19 character * profile IDs are supported for compatibility with previous versions * of the PayPal API. */ public function __construct($profileId) { $this->collection = new Collection(self::$allowedValues, null); $this->collection->setValue('METHOD', self::$methodName); $this->collection->setValue('PROFILEID', $profileId); $this->nvpResponse = null; }
/** * @param String $queryString from paypal response */ public function __construct($queryString) { $response = array(); /* make sure that ? is not passed */ $url = explode("?", $queryString); $index = count($url) - 1; $queryString = $url[$index]; $parts = explode("&", $queryString); foreach ($parts as $part) { $values = explode("=", $part); $response[$values[0]] = $values[1]; } $this->collection = new Collection(self::$allowedValues, $response); $this->collection->setValue('METHOD', self::$methodName); }
/** * A unique identifier of the specific payment request. * Required for paralel payments. * Character length and limit: Up to 127 single-byte characters * * @param String $id */ public function setPaymentRequestId($id) { $this->collection->setValue('PAYMENTREQUESTID', $id); }
/** * Shipping option. Required if specifying the Callback URL. The amount of * the flat rate shipping option. Limitations: Must not exceed $10,000 USD * in any currency. No currency symbol. Must have two decimal places, * decimal separator must be a period (.), and the optional thousands * separator must be a comma (,). * * @param String $amount */ public function setAmount($amount) { $this->collection->setValue('SHIPPINGOPTIONAMOUNT', $amount); }
/** * Tax amount for each billing cycle during this payment period. * Note: All amounts in the request must have the same currency. * Character length and limitations: Does not exceed $10,000 USD in any * currency. No currency symbol. Regardless of currency, decimal separator * is a period (.), and the optional thousands separator is a comma (,). * Equivalent to nine characters maximum for USD. * * @param string $amount */ public function setTaxAmount($amount) { $this->collection->setValue('TAXAMT', $amount); }
/** * @param String $date the date when billing for this profile begins. Must be * a valid date, in UTC/GMT format. Note: The profile may take up to * 24 hours for activation. */ public function setProfileStartDate($date) { $this->collection->setValue('PROFILESTARTDATE', $date); }
/** * Phone number. * Character length and limit: 20 single-byte characters. * * @param String $phoneNumber */ public function setPhoneNumber($phoneNumber) { $this->collection->setValue('SHIPTOPHONENUM', $phoneNumber); }
/** * The unique identifier provided by eBay for this order from the buyer. * Character length: 255 single-byte characters * @param String $cartId */ public function setCartId($cartId) { $this->collection->setValue('EBAYCARTID', $cartId); }
/** * @param RefundType $type defaults to Full */ public function setRefundType(RefundType $type) { $this->collection->setValue('REFUNDTYPE', $type->getCode()); }
/** * Flag to indicate whether you want the results returned by Fraud * Management Filters. By default, you do not receive this information. * true - do not receive FMF details (default) * false - receive FMF details * * @param boolean $return */ public function setReturnFmfDetails($return) { $return = $return ? 1 : 0; $this->collection->setValue('RETURNFMFDETAILS', $return); }
/** * Possible options for the survey answers on the PayPal Review page. * Answers are displayed only if a valid survey question is present. * Limitations: 15 single-byte characters * Array has to be indexed (from 0) * * @param array $choices */ public function setSurveyChoices(array $choices) { foreach ($choices as $index => $choice) { $this->collection->setValue('L_SURVEYCHOICE' . $index, $choice); } }
/** * Unique identifier for the merchant. For parallel payments, this * field is required and must contain the Payer Id or the email address * of the merchant. Character length and limitations: 127 single-byte * alphanumeric characters * * @param String $id */ public function setPayPalAccountId($id) { $this->collection->setValue('SELLERPAYPALACCOUNTID', $id); }
/** * Whether the merchant can accept push funding: * true — Merchant can accept push funding * false — Merchant cannot accept push funding * Note: This field overrides the setting in the merchant's PayPal account * * @param boolean $pushFunding */ private function setAllowPushFunding($pushFunding) { $this->collection->setValue('ALLOWPUSHFUNDING', $pushFunding); }
/** * A timestamped token, the value of which was returned in the response to * the first call to SetExpressCheckout. You can also use the token * returned in the SetCustomerBillingAgreement response. * Either this token or a credit card number is required. If you include * both token and credit card number, the token is used and credit card * number is ignored. * Call CreateRecurringPaymentsProfile once for each billing agreement * included in SetExpressCheckout request and use the same token for each * call. Each CreateRecurringPaymentsProfile request creates a single * recurring payments profile. * Note: Tokens expire after approximately 3 hours. * * @param string $token */ public function setToken($token) { $this->collection->setValue('TOKEN', $token); }
/** * @param String $autoBill This field indicates whether you would like * PayPal to automatically bill the outstanding balance amount in the * next billing cycle. The outstanding balance is the total amount of * any previously failed scheduled payments that have yet to be * successfully paid. */ public function setAutoBill(AutoBill $autoBill) { $this->collection->setValue('AUTOBILLOUTAMT', $autoBill->getValue()); }
/** * Custom annotation field for your own use. * Note: For recurring payments, this field is ignored. * Character length and limitations: 256 single-byte alphanumeric bytes. * * @param String $custom */ public function setCustomField($custom) { $this->collection->setValue('BILLINGAGREEMENTCUSTOM', $custom); }
/** * Issue number of Maestro or Solo card. Character length: two numeric * digits maximum. * * @param String $date */ public function setIssueNumber($number) { $this->collection->setValue('ISSUENUMBER', $number); }
/** * By default, PayPal will suspend the pending profile in the event that * the initial payment amount fails. You can override this default behavior * by setting this field to ContinueOnFailure, which indicates that if the * initial payment amount fails, PayPal should add the failed payment * amount to the outstanding balance for this recurring payment profile. * When this flag is set to ContinueOnFailure, a success code will be * returned to the merchant in the CreateRecurringPaymentsProfile response * and the recurring payments profile will be activated for scheduled * billing immediately. You should check your IPN messages or PayPal * account for updates of the payment status. If this field is not set or * is set to CancelOnFailure, PayPal will create the recurring payment * profile, but will place it into a pending status until the initial * payment is completed. If the initial payment clears, PayPal will notify * you by IPN that the pending profile has been activated. If the payment * fails, PayPal will notify you by IPN that the pending profile has been * canceled. Character length and limitations: ContinueOnFailure or * CancelOnFailure. * * @param String $action */ public function setFaildInitialAmountAction($action) { $this->collection->setValue('FAILEDINITAMTACTION', $action); }
/** * @param string Email address of payer. Character length and limitations: * 127 single-byte characters. */ public function setEmail($email) { $this->collection->setValue('EMAIL', $email); }
/** * An identification code for use by third-party applications to identify * transactions. Character length and limitations: 32 single-byte * alphanumeric characters * * @param string $source */ public function setButtonSource($source) { $this->collection->setValue('BUTTONSOURCE', $source); }
/** * @param string $note the reason for the change in status. For profiles * created using Express Checkout, this message will be included in * the email notification to the buyer when the status of the profile * is successfully changed, and can also be seen by both you and the * buyer on the Status History page of the PayPal account. */ public function setNote($note) { $this->collection->setValue('NOTE', $note); }
/** * The merchant's own unique reference or invoice number. * * @param String $reference */ public function setProfileReference($reference) { $this->collection->setValue('PROFILEREFERENCE', $reference); }
/** * Date when the user registered with the marketplace. * * @param string $date - xs:dateTime */ public function setRegistrationDate($registrationDate) { $this->collection->setValue('BUYERREGISTRATIONDATE', $registrationDate); }
/** * @param ItemCategory $itemCategory */ public function setItemCategory(ItemCategory $itemCategory) { $this->collection->setValue('ITEMCATEGORY', $itemCategory); }