diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b0d51c85..e63d12bb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,8 +16,6 @@ ### Contribution to refactoring: -- branch should be created from refactoring -- code changes should follow Magento2 coding standard - include unit tests - open the Pull Request - check that git workflows checks have passed \ No newline at end of file diff --git a/example/transactions/credit_management.php b/example/transactions/credit_management.php index f4200bc0..6cb53d1c 100644 --- a/example/transactions/credit_management.php +++ b/example/transactions/credit_management.php @@ -7,6 +7,10 @@ $buckaroo = new Buckaroo($_ENV['BPE_WEBSITE_KEY'], $_ENV['BPE_SECRET_KEY']); +// Sometimes we need to combine multiple payments. +// By adding "manually," it will not execute immediately but rather return the built payload. +// With the returned payload, we can combine it with the next payment. + $invoice = $buckaroo->payment('credit_management')->manually()->createCombinedInvoice([ 'invoice' => str_random(), 'applyStartRecurrent' => 'False', @@ -51,6 +55,8 @@ ] ]); +// In this case, we have the payload stored in the $invoice variable. We can now combine it with the next payment using the combine method + $response = $buckaroo->payment('sepadirectdebit')->combine($invoice)->pay([ 'invoice' => uniqid(), 'amountDebit' => 10.10,