def signature(type): options = [ "fail_on_duplicate_payment_method", "make_default", "us_bank_account_verification_method", "verification_merchant_account_id", "verify_card", "verification_amount", "verification_account_type", { "adyen": ["overwrite_brand", "selected_brand"] }, { "paypal": [ "payee_email", "order_id", "custom_field", "description", "amount", { "shipping": Address.create_signature() } ], }, ] signature = [ "billing_address_id", "cardholder_name", "customer_id", "cvv", "device_data", "device_session_id", "expiration_date", "expiration_month", "expiration_year", "number", "payment_method_nonce", "paypal_refresh_token", "paypal_vault_without_upgrade", "token", { "billing_address": Address.create_signature() }, { "options": options } ] return signature
def signature(type): options = [ "fail_on_duplicate_payment_method", "make_default", "us_bank_account_verification_method", "verification_merchant_account_id", "verify_card", "verification_amount", "verification_account_type", { "adyen": [ "overwrite_brand", "selected_brand" ] }, { "paypal": [ "payee_email", "order_id", "custom_field", "description", "amount", { "shipping": Address.create_signature() } ], }, ] signature = [ "billing_address_id", "cardholder_name", "customer_id", "cvv", "device_data", "device_session_id", "expiration_date", "expiration_month", "expiration_year", "number", "payment_method_nonce", "paypal_refresh_token", "paypal_vault_without_upgrade", "token", { "billing_address": Address.create_signature() }, { "options": options } ] return signature
def update_signature(): return [ "company", "email", "fax", "first_name", "id", "last_name", "phone", "website", "device_data", "device_session_id", "fraud_merchant_id", "payment_method_nonce", "default_payment_method_token", { "credit_card": CreditCard.signature("update_via_customer") }, { "custom_fields": ["__any_key__"] }, { "options": [{ "paypal": [ "payee_email", "order_id", "custom_field", "description", "amount", { "shipping": Address.create_signature() } ] }] }, ]
def create(self, params={}): Resource.verify_keys(params, Address.create_signature()) if not "customer_id" in params: raise KeyError("customer_id must be provided") if not re.search("\A[0-9A-Za-z_-]+\Z", params["customer_id"]): raise KeyError("customer_id contains invalid characters") response = self.config.http().post("/customers/" + params.pop("customer_id") + "/addresses", {"address": params}) if "address" in response: return SuccessfulResult({"address": Address(self.gateway, response["address"])}) elif "api_error_response" in response: return ErrorResult(self.gateway, response["api_error_response"])
def create(self, params={}): Resource.verify_keys(params, Address.create_signature()) if not "customer_id" in params: raise KeyError("customer_id must be provided") if not re.search("\A[0-9A-Za-z_-]+\Z", params["customer_id"]): raise KeyError("customer_id contains invalid characters") response = self.config.http().post("/customers/" + params.pop("customer_id") + "/addresses", {"address": params}) if "address" in response: return SuccessfulResult({"address": Address(self.gateway, response["address"])}) elif "api_error_response" in response: return ErrorResult(self.gateway, response["api_error_response"])
def update_signature(): return [ "company", "email", "fax", "first_name", "id", "last_name", "phone", "website", "device_data", "device_session_id", "fraud_merchant_id", "payment_method_nonce", "default_payment_method_token", {"credit_card": CreditCard.signature("update_via_customer")}, {"custom_fields": ["__any_key__"]}, {"options": [{"paypal": [ "payee_email", "order_id", "custom_field", "description", "amount", { "shipping": Address.create_signature() } ]}]}, ]
def signature(type): signature = [ "customer_id", "payment_method_nonce", "token", "billing_address_id", { "billing_address": Address.create_signature() }, { "options": [ "make_default", "verify_card", "fail_on_duplicate_payment_method", "verification_merchant_account_id", ] } ] return signature
def signature(type): signature = [ "customer_id", "payment_method_nonce", "token", "billing_address_id", {"billing_address": Address.create_signature()}, {"options": [ "make_default", "verify_card", "fail_on_duplicate_payment_method", "verification_merchant_account_id", ] } ] return signature
def create_signature(): return [ "company", "email", "fax", "first_name", "id", "last_name", "phone", "website", "device_data", "payment_method_nonce", "device_session_id", "fraud_merchant_id", # NEXT_MAJOR_VERSION remove device_session_id and fraud_merchant_id { "risk_data": [ "customer_browser", "customer_device_id", "customer_ip", "customer_location_zip", "customer_tenure" ] }, { "credit_card": CreditCard.create_signature() }, { "custom_fields": ["__any_key__"] }, { "three_d_secure_pass_thru": [ "cavv", "ds_transaction_id", "eci_flag", "three_d_secure_version", "xid", ] }, { "options": [{ "paypal": [ "payee_email", "order_id", "custom_field", "description", "amount", { "shipping": Address.create_signature() } ] }] }, ]
def signature(type): options = [ "fail_on_duplicate_payment_method", "make_default", "verification_merchant_account_id", "verify_card", "verification_amount", { "adyen": ["overwrite_brand", "selected_brand"] } ] signature = [ "billing_address_id", "cardholder_name", "customer_id", "cvv", "device_data", "device_session_id", "expiration_date", "expiration_month", "expiration_year", "number", "payment_method_nonce", "token", { "billing_address": Address.create_signature() }, { "options": options } ] return signature
def signature(type): options = [ "fail_on_duplicate_payment_method", "make_default", "verification_merchant_account_id", "verify_card", "verification_amount", { "adyen": [ "overwrite_brand", "selected_brand" ] } ] signature = [ "billing_address_id", "cardholder_name", "customer_id", "cvv", "device_data", "device_session_id", "expiration_date", "expiration_month", "expiration_year", "number", "payment_method_nonce", "token", { "billing_address": Address.create_signature() }, { "options": options } ] return signature
def signature(type): options = [ "fail_on_duplicate_payment_method", "make_default", "us_bank_account_verification_method", "verification_merchant_account_id", "verify_card", "verification_amount", "verification_account_type", { "adyen": [ "overwrite_brand", "selected_brand" ] }, { "paypal": [ "payee_email", "order_id", "custom_field", "description", "amount", { "shipping": Address.create_signature() } ], }, ] three_d_secure_pass_thru = [ "cavv", "ds_transaction_id", "eci_flag", "three_d_secure_version", "xid" ] signature = [ "billing_address_id", "cardholder_name", "customer_id", "cvv", "device_data", "expiration_date", "expiration_month", "expiration_year", "number", "payment_method_nonce", "paypal_refresh_token", "token", "device_session_id", # NEXT_MAJOR_VERSION remove device_session_id { "billing_address": Address.create_signature() }, { "options": options }, { "three_d_secure_pass_thru": three_d_secure_pass_thru } ] return signature