2014-09-25 1 views
0

Recurly 웹 인터페이스를 사용하여 계정을 만들면 결제 정보가 없습니다. 액세스하려고하면 AttributeError가 표시됩니다. 은 결제 정보를 계정에 추가 할 수 없습니다. Python API 버전 2.2.4를 사용하고 있습니다.Recurly Billinginfo를 Python API와 함께 추가하는 방법은 무엇입니까?

신용 카드 번호 또는 PCI 준수를 유지하기 위해 로컬로 볼 수없는 다른 필드를 모른 채 BillingInfo를 만들어야하므로 https://docs.recurly.com/api/billing-info#update-billing-info-token에 설명 된 토큰을 사용하려고합니다. 기존 BillingInfo (token_id를 설정하고 BillingInfo를 저장)에 대해이 작업을 수행 할 수 있지만이 작업을 수행하려면 BillingInfo가 필요합니다.

아직 계정이없는 계정의 결제 정보를 저장하려면 어떻게해야합니까?

(Pdb) acct = recurly.Account.get(code) 
(Pdb) acct 
<recurly.Account object at 0x7f2a160530d0> 
(Pdb) acct.billing_info 
*** AttributeError: billing_info 
(Pdb) b_i = recurly.BillingInfo() 
(Pdb) b_i.email = '[email protected]' 
(Pdb) b_i.save() 
*** AttributeError: collection_path 
(Pdb) account.billing_info = b_i 
*** AttributeError: can't set attribute 

답변

1

Account:update_billing_info 방법을 사용하십시오.

코드 스니 펫에서 다음과 같이됩니다 : acct.update_billing_info(b_i).

관련 문제