Skip to content

Swe 12 enable payment suite #13

merged 14 commits into from Apr 8, 2019

Swe 12 enable payment suite #13

merged 14 commits into from Apr 8, 2019


Copy link

ahm11003 commented Apr 5, 2019

  • set up API call to post a payment
  • added screen which requires user to "authorize" Synchrony to make the payment (the language may need some revision, but conceptually is good)
  • if payment web service returns successfully, we display payment results such as confirmation number and payment ID
  • implemented more reusable careCreditDateFormatter to format all dates that interact with Synchrony API and requires no set-up
ahm11003 added 14 commits Mar 29, 2019
- also changed target for `PaymentDetailInterfaceController`
- we now will receive a dictionary in Payment Result which contains (for now) the payment confirmation number and payment id
- these are displayed in the labels
- in order to avoid having a back button on the Payment Result screen, we present it modally and then pop to the root controller
- this gives the user a view with Cancel in the left corner, and a Home button. Tapping cancel will dismiss the modal, showing the Home screen
- it appears that as a result of setting the target membership of `PaymentDetailInterfaceController` to only WKExtension has enabled this function call which was not working before
- also made IBOutlets `weak` to avoid retain cycles
- we present an action sheet to the user which requires them to tape Pay Now to submit payment
- activity indicator is shown until web service returns
- if successful, we push to the payment result screen and show confirmation number, etc
- if error, we ask the user to try again later
# Conflicts:
#	SynchronyFinancial/SynchronyFinancial WatchKit Extension/FetchData.swift
#	SynchronyFinancial/SynchronyFinancial.xcodeproj/project.pbxproj
- created new `enum PaymentType` to provide a cleaner way to pass code for either current balance payment or minimum due payment
- if the minimum payment due is $0, we disable the button to allow paying that amount
- if the current account balance is $0, we disable the button to allow paying that amount
- we now simply display “Done” as the title to dismiss the payment result screen which is presented modally
- several commits ago we created `careCreditDateFormatter`
- replace usage of regular `DateFormatter` which require setting of format style and locale in each instance to `static` property which automatically returns the date formatter we want
@ahm11003 ahm11003 requested review from rrk12005, jod13004 and tiw15001 Apr 5, 2019
Copy link

rrk12005 left a comment

looks good

@ahm11003 ahm11003 merged commit e48f289 into master Apr 8, 2019
Sign in to join this conversation on GitHub.
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.