recurly - Cannot add address info in Create Account API in PHP -


  $ account = new recur_account ('1'); $ Account-> Email = $ _POST ['email address']; $ Account- & gt; First_name = $ _POST ['first name']; $ Account-> Last_name = $ _POST ['last name']; $ Address = new recur_adress (); $ Address- & gt; Address1 = $ _POST ['address']; $ Address- & gt; Country = $ _POST ['country']; $ Address- & gt; City = $ _POST ['city']; $ Address- & gt; Phone = $ _POST ['phone']; $ Address- & gt; State = $ _POST ['state']; $ Address- & gt; Zip = $ _POST ['zipcode']; $ Account-> Address = $ address; $ Check = $ account-> Create ();    

Your syntax and everything else looks ok I was able to use your code (Modify slightly):

  $ account = new recurly_account ('1'); $ Account- & gt; Email = 'emailaddress@email.com'; $ Account-> First_name = 'firstname'; $ Account- & gt; Last_name = 'lastname'; $ Address = new recur_adress (); $ Address- & gt; Address 1 = 'address'; $ Address- & gt; Country = 'country'; $ Address- & gt; City = 'city'; $ Address- & gt; Phone = 'phone'; $ Address- & gt; State = 'state'; $ Address- & gt; Zip = 'zipcode'; $ Account-> Address = $ address; $ Accounts-> Create ();   

To create an account w / address information, it probably evaluates '' (empty string) for each address field of $ _POST ['field']? The only required field is the account code that you specify when calling Richerly_account, so in this situation the account will be created, but all its parameters will be blank.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -