| @@ 51-63 (lines=13) @@ | ||
| 48 | * |
|
| 49 | * @return array |
|
| 50 | */ |
|
| 51 | public function createMonthlySubscription($token, $amount, $description) |
|
| 52 | { |
|
| 53 | $data = [ |
|
| 54 | 'PROFILESTARTDATE' => Carbon::now()->toAtomString(), |
|
| 55 | 'DESC' => $description, |
|
| 56 | 'BILLINGPERIOD' => 'Month', |
|
| 57 | 'BILLINGFREQUENCY' => 1, |
|
| 58 | 'AMT' => $amount, |
|
| 59 | 'CURRENCYCODE' => $this->currency, |
|
| 60 | ]; |
|
| 61 | ||
| 62 | return $this->createRecurringPaymentsProfile($data, $token); |
|
| 63 | } |
|
| 64 | ||
| 65 | /** |
|
| 66 | * Create recurring subscription on yearly basis. |
|
| @@ 74-86 (lines=13) @@ | ||
| 71 | * |
|
| 72 | * @return array |
|
| 73 | */ |
|
| 74 | public function createYearlySubscription($token, $amount, $description) |
|
| 75 | { |
|
| 76 | $data = [ |
|
| 77 | 'PROFILESTARTDATE' => Carbon::now()->toAtomString(), |
|
| 78 | 'DESC' => $description, |
|
| 79 | 'BILLINGPERIOD' => 'Year', |
|
| 80 | 'BILLINGFREQUENCY' => 1, |
|
| 81 | 'AMT' => $amount, |
|
| 82 | 'CURRENCYCODE' => $this->currency, |
|
| 83 | ]; |
|
| 84 | ||
| 85 | return $this->createRecurringPaymentsProfile($data, $token); |
|
| 86 | } |
|
| 87 | } |
|
| 88 | ||