Skip to content

Commit 90abc89

Browse files
Changes generated by 062301fb54d210c4e77516ae38ad02cbca6b3935
This commit was automatically created from gocardless/gocardless-pro-php-template@062301f by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-pro-php-template/actions/runs/11347988380
1 parent 92070aa commit 90abc89

32 files changed

+92
-82
lines changed

lib/Resources/BillingRequestFlow.php

+8
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* @property-read mixed $session_token
3030
* @property-read mixed $show_redirect_buttons
3131
* @property-read mixed $show_success_redirect_button
32+
* @property-read mixed $skip_success_screen
3233
*/
3334
class BillingRequestFlow extends BaseResource
3435
{
@@ -159,4 +160,11 @@ class BillingRequestFlow extends BaseResource
159160
*/
160161
protected $show_success_redirect_button;
161162

163+
/**
164+
* If true, the payer will not be redirected to the success screen after
165+
* completing the flow. A redirect_uri needs to be provided for this
166+
* parameter to be taken into account.
167+
*/
168+
protected $skip_success_screen;
169+
162170
}

tests/Integration/BillingRequestFlowsIntegrationTest.php

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public function testBillingRequestFlowsCreate()
4444
$this->assertEquals($body->session_token, $response->session_token);
4545
$this->assertEquals($body->show_redirect_buttons, $response->show_redirect_buttons);
4646
$this->assertEquals($body->show_success_redirect_button, $response->show_success_redirect_button);
47+
$this->assertEquals($body->skip_success_screen, $response->skip_success_screen);
4748

4849

4950
$expectedPathRegex = $this->extract_resource_fixture_path_regex($fixture);
@@ -82,6 +83,7 @@ public function testBillingRequestFlowsInitialise()
8283
$this->assertEquals($body->session_token, $response->session_token);
8384
$this->assertEquals($body->show_redirect_buttons, $response->show_redirect_buttons);
8485
$this->assertEquals($body->show_success_redirect_button, $response->show_success_redirect_button);
86+
$this->assertEquals($body->skip_success_screen, $response->skip_success_screen);
8587

8688

8789
$expectedPathRegex = $this->extract_resource_fixture_path_regex($fixture);

tests/fixtures/bank_authorisations.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"method": "POST",
44
"path_template": "/bank_authorisations",
55
"url_params": {},
6-
"body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 8081","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2024-10-11T13:11:51.839Z","expires_at":"2024-10-11T13:11:51.839Z","id":"BAU123","last_visited_at":"2020-01-01T12:00:00.000Z","links":{"billing_request":"BRQ123","institution":"monzo"},"qr_code_url":"https://pay.gocardless.com/obauth/BAU123/qr_code","redirect_uri":"https://my-website.com/abc/callback","url":"https://pay.gocardless.com/obauth/BAU123"}}
6+
"body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 8081","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2024-10-15T14:17:17.431Z","expires_at":"2024-10-15T14:17:17.431Z","id":"BAU123","last_visited_at":"2020-01-01T12:00:00.000Z","links":{"billing_request":"BRQ123","institution":"monzo"},"qr_code_url":"https://pay.gocardless.com/obauth/BAU123/qr_code","redirect_uri":"https://my-website.com/abc/callback","url":"https://pay.gocardless.com/obauth/BAU123"}}
77
},
88
"get": {
99
"method": "GET",
1010
"path_template": "/bank_authorisations/:identity",
1111
"url_params": {"identity": "BAU123"},
12-
"body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 7887","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2024-10-11T13:11:51.839Z","expires_at":"2024-10-11T13:11:51.839Z","id":"BAU123","last_visited_at":"2020-01-01T12:00:00.000Z","links":{"billing_request":"BRQ123","institution":"monzo"},"qr_code_url":"https://pay.gocardless.com/obauth/BAU123/qr_code","redirect_uri":"https://my-website.com/abc/callback","url":"https://pay.gocardless.com/obauth/BAU123"}}
12+
"body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 7887","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2024-10-15T14:17:17.431Z","expires_at":"2024-10-15T14:17:17.431Z","id":"BAU123","last_visited_at":"2020-01-01T12:00:00.000Z","links":{"billing_request":"BRQ123","institution":"monzo"},"qr_code_url":"https://pay.gocardless.com/obauth/BAU123/qr_code","redirect_uri":"https://my-website.com/abc/callback","url":"https://pay.gocardless.com/obauth/BAU123"}}
1313
}
1414
}
1515

tests/fixtures/billing_request_flows.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"method": "POST",
44
"path_template": "/billing_request_flows",
55
"url_params": {},
6-
"body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":false,"created_at":"2024-10-11T13:11:51.843Z","customer_details_captured":true,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2024-10-11T13:11:51.843Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":false,"lock_currency":true,"lock_customer_details":true,"prefilled_bank_account":{"account_type":"savings"},"prefilled_customer":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","danish_identity_number":"220550-6218","email":"[email protected]","family_name":"Osborne","given_name":"Frank","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":false,"show_success_redirect_button":true}}
6+
"body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":true,"created_at":"2024-10-15T14:17:17.435Z","customer_details_captured":true,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2024-10-15T14:17:17.435Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":true,"lock_currency":false,"lock_customer_details":false,"prefilled_bank_account":{"account_type":"savings"},"prefilled_customer":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","danish_identity_number":"220550-6218","email":"[email protected]","family_name":"Osborne","given_name":"Frank","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":true,"show_success_redirect_button":true,"skip_success_screen":false}}
77
},
88
"initialise": {
99
"method": "POST",
1010
"path_template": "/billing_request_flows/:identity/actions/initialise",
1111
"url_params": {"identity": "BRF123"},
12-
"body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":false,"created_at":"2024-10-11T13:11:51.843Z","customer_details_captured":false,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2024-10-11T13:11:51.843Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":false,"lock_currency":false,"lock_customer_details":true,"prefilled_bank_account":{"account_type":"savings"},"prefilled_customer":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","danish_identity_number":"220550-6218","email":"[email protected]","family_name":"Osborne","given_name":"Frank","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":true,"show_success_redirect_button":false}}
12+
"body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":false,"created_at":"2024-10-15T14:17:17.435Z","customer_details_captured":true,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2024-10-15T14:17:17.435Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":false,"lock_currency":false,"lock_customer_details":false,"prefilled_bank_account":{"account_type":"savings"},"prefilled_customer":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","danish_identity_number":"220550-6218","email":"[email protected]","family_name":"Osborne","given_name":"Frank","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":false,"show_success_redirect_button":true,"skip_success_screen":true}}
1313
}
1414
}
1515

tests/fixtures/billing_request_templates.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"method": "GET",
44
"path_template": "/billing_request_templates",
55
"url_params": {},
6-
"body": {"billing_request_templates":[{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_currency":"GBP","mandate_request_description":"Top-up Payment","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":null,"metadata":{},"name":"12 Month Gold Plan","payment_request_amount":"100.00","payment_request_currency":"GBP","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"},{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_currency":"GBP","mandate_request_description":"Top-up Payment","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":null,"metadata":{},"name":"12 Month Gold Plan","payment_request_amount":"100.00","payment_request_currency":"GBP","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 2887","before":"example before 9430"},"limit":50}}
6+
"body": {"billing_request_templates":[{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_currency":"GBP","mandate_request_description":"Top-up Payment","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":null,"metadata":{},"name":"12 Month Gold Plan","payment_request_amount":"100.00","payment_request_currency":"GBP","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"},{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_currency":"GBP","mandate_request_description":"Top-up Payment","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":null,"metadata":{},"name":"12 Month Gold Plan","payment_request_amount":"100.00","payment_request_currency":"GBP","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 1128","before":"example before 2409"},"limit":50}}
77
},
88
"get": {
99
"method": "GET",

0 commit comments

Comments
 (0)