Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payment API: examples adjusted for event API #879

Merged
merged 1 commit into from
Dec 16, 2020

Conversation

Wiezzel
Copy link

@Wiezzel Wiezzel commented Dec 15, 2020

  • Removed remaining deprecated references to PaymentProviderApi and PaymentRequestorApi.
  • Introduced --app-session-id parameter for payment_api, invoice_flow, and debit_note_flow examples in order to test event filtering.
  • Changed the way provider and requestor sub-services are used to avoid the hack with YAGNA_PAYMENT_URL.

Testing instructions:

  1. Run payment_api example with --app-session-id=whatever.
  2. Try running debit_note_flow and invoice_flow with --app-session-id=somthing-else (should fail on event unwrapping ❌ ).
  3. Run debit_note_flow and invoice_flow with --app-session-id=whatever (should work ✔️ ).
  4. Run all other examples (should work ✔️ ).

* Removed remaining deprecated references to `PaymentProviderApi` and
  `PaymentRequestorApi`.
* Introduced `--app-session-id` parameter for `payment_api`,
  `invoice_flow`, and `debit_note_flow` examples in order to test
  event filtering.
* Changed the way provider and requestor sub-services are used to
  avoid the hack with `YAGNA_PAYMENT_URL`.

Signed-off-by: Adam Wierzbicki <awierzbicki@golem.network>
@Wiezzel Wiezzel requested a review from maaktweluit December 15, 2020 16:57
@Wiezzel Wiezzel self-assigned this Dec 15, 2020
@Wiezzel Wiezzel requested a review from a team December 15, 2020 16:57
Copy link
Contributor

@maaktweluit maaktweluit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

let requestor: PaymentRequestorApi = client.interface()?;
// Create requestor / provider PaymentApi
let provider_url = format!("{}provider/", rest_api_url()).parse().unwrap();
let provider: PaymentApi = WebClient::builder()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you change the post-fix'ing? i thought i tested this as well... :S

@Wiezzel Wiezzel merged commit 1d36923 into event-api/master Dec 16, 2020
@Wiezzel Wiezzel deleted the wiezzel/event_api branch December 16, 2020 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants