Created
October 28, 2022 10:42
-
-
Save A-pZ/ef2b8cbb04c3da50bd5432fa130fea47 to your computer and use it in GitHub Desktop.
決済手段のデフォルトを登録
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Customer customer = Customer.retrieve(paymentCustomer.id()); // 決済利用者のカスタマIDを指定 | |
CustomerUpdateParams customerUpdateParams = CustomerUpdateParams.builder() | |
.setInvoiceSettings( | |
// 決済したPaymentMethodのIDを InvoiceSettingを経由して指定する | |
CustomerUpdateParams.InvoiceSettings.builder().setDefaultPaymentMethod(paymentMethodId.value()).build() | |
).build(); | |
customer.update(customerUpdateParams); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment