注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号
x
Stripe 的oa题,For all intents and purposes
#INIT <merchant_id> ‹starting_balance>
# Initializes a merchant with a unique identifier string and starting balance (the amount of money in their account).
# If a merchant with the given identifier has already been created, this command should do nothing.
# CREATE <payment_intent_id> <merchant_id> <amount>
# Creates a Payment Intent for a merchant with a given amount. After creation, the state of the Payment Intent should be REQUIRED_ACTION
# If a Payment Intent with the given identifier already exists, or if a merchant with the given identifier does not exist, or if the amount is negative, this command should do nothing.
# ATTEMPT <payment_intent_id>
# •Transitions a Payment Intent with a given identifier from the REQUIRES_ACTION state to the PROCESSING state.
# •If no Payment Intent with the given identifier exists, or if the state of the Payment Intent is not REQUIRES_ACTION, this command should do nothing
# SUCCEED <payment_intent_id>
# •Transitions a Payment Intent with a given identifier from the PROCESSING state to the COMPLETED state.
# •If no Payment Intent with the given identifier exists, or if the state of the Payment Intent is not PROCESSING, this command should do nothing.
# input:
# INIT m1 0
# INIT m2 10
# CREATE p1 m1 50
# ATTEMPT p1
# SUCCEED p1
# CREATE p2 m2 100
# ATTEMPT p2
# output:
# m1 50
# m2 10
# explanation:
# INIT m1 0 initializes merchant m1 with a starting balance of 0
# INIT m2 10 initializes merchant m2 with a starting balance of 10
# CREATE p1 m1 50 creates a payment intent p1 for merchant m1 with an amount of 50 and initial state of REQUIRES_ACTION
# ATTEMPT p1 transitions p1 from REQUIRES_ACTION to PROCESSING
# SUCCEED p1 from PROCESSING to COMPLETED and increments merchant m1's balance by 50
# CREATE p2 m2 100 creates a payment Intent p2 for merchant m您好! 本帖隐藏的内容需要积分高于 188 才可浏览 您当前积分为 0。 使用VIP即刻解锁阅读权限或查看其他获取积分的方式 游客,您好! 本帖隐藏的内容需要积分高于 188 才可浏览 您当前积分为 0。 VIP即刻解锁阅读权限 或 查看其他获取积分的方式 t;
# Processing a refund for a previously successful payment intent in the COMPLETED state. This should decrement the merchant's balance by the amount of the Payment Intent in order to return the funds to the customer.
# • If no Payment intent with the given identifier exists, or if the Payment Intent is not in the COMPLETED state, or if the Payment Intent has already been refunded, this command should do nothing.
感觉stripe的题大部份都有面经,求加米
另外还有几道oa题叫catch me if you can, card meta data
|