srmklive / laravel-paypal

Laravel plugin for processing payments through PayPal.
https://laravel-paypal-demo.srmk.info/
MIT License
1.03k stars 314 forks source link

Recuring Profile not created its given an error. #36

Closed prasadmunna closed 8 years ago

prasadmunna commented 8 years ago

here is my code

<?php /**

////// /* public function setRecurrinProfilePaypal(){ // The $token is the value returned from SetExpressCheckout API call $token = Session::get('token'); $data = $this->setDataPaypal();

        $profile_desc = !empty($data['subscription_desc']) ?

        $data['subscription_desc'] : $data['invoice_description'];
              $startdate=date("Y-m-d",time());
              //  $data['subscription_desc'];
                 $data['invoice_description'];
                $data = [
                    'PROFILESTARTDATE' => $startdate,
                   'DESC' => $profile_desc,
                    'BILLINGPERIOD' => 'Month', // Can be 'Day', 'Week', 'SemiMonth', 'Month', 'Year'
                    'BILLINGFREQUENCY' => 12, // set 12 for monthly, 52 for yearly
                    'AMT' => 10, // Billing amount for each billing cycle
                    'CURRENCYCODE' => 'USD', // Currency code 
                    'TRIALBILLINGPERIOD' => 'Day',  // (Optional) Can be 'Day', 'Week', 'SemiMonth', 'Month', 'Year'
                    'TRIALBILLINGFREQUENCY' => 10, // (Optional) set 12 for monthly, 52 for yearly 
                  'TRIALTOTALBILLINGCYCLES' => 1, // (Optional) Change it accordingly
                    'TRIALAMT' => 0, // (Optional) Change it accordingly
                ];
                $response = $this->express_checkout_provider->createRecurringPaymentsProfile($data, $token);
                print_r($response);
                die();
            }*/

}

------------- response is---------------------- Array ( [TIMESTAMP] => 2016-08-17T07:31:11Z [CORRELATIONID] => 947e6c20944d5 [ACK] => Failure [VERSION] => 123 [BUILD] => 000000 [L_ERRORCODE0] => 11581 [L_SHORTMESSAGE0] => Invalid Data [L_LONGMESSAGE0] => Profile description is invalid [L_SEVERITYCODE0] => Error )

srmklive commented 8 years ago

It seems to me the data you are providing to PayPal for creating recurring profile is wrong. Refer to this issue #16 regarding recurring payments.