Skip to content

Commit 8c6a543

Browse files
committed
Add notes on storing contextual data and payment handling
1 parent db5ba90 commit 8c6a543

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ Check the [InitiatePaymentRequest](src/Http/Requests/InitiatePaymentRequest.php#
114114

115115
This `POST` request will typically be made by submitting a form from your frontend to the route described above.
116116

117-
> [!NOTE] if you need to store additional/contextual data with this payment, you can include such data in the request, in a field named `metadata`. The value must be a valid JSON string.
117+
> [!NOTE]
118+
> if you need to store additional/contextual data with this payment, you can include such data in the request, in a field named `metadata`. The value must be a valid JSON string.
118119
119120
#### Step 2
120121

@@ -125,13 +126,17 @@ Upon user confirmation of transaction, user is redirected to the appropriate pay
125126
When user is done with the transaction on the payment handler's end (either successfully paid, or declined transaction), user is redirected
126127
back to `/payment/completed` (`route('payment.finished.callback_url')` provided by this package) .
127128

128-
> [!NOTE] If the `Payment` has [`metadata`](#step-1) (supplied with the payment initiation request), with a key named `completion_url`, the user will be redirected to that URL instead on successful payment, with the transaction reference included as `transaction_reference` in the URL query string.
129+
> [!NOTE]
130+
> If the `Payment` has [`metadata`](#step-1) (supplied with the payment initiation request), with a key named `completion_url`, the user will be redirected to that URL instead on successful payment, with the transaction reference included as `transaction_reference` in the URL query string.
129131
130-
> [!NOTE] If the `Payment` has [`metadata`](#step-1) (supplied with the payment initiation request), and it contains a key named `payment_processor`, it will be used to dynamically set the payment handler for that particular transaction. Valid value is any of [the providers listed above](#currently-supported-payment-handlers)
132+
> [!NOTE]
133+
> If the `Payment` has [`metadata`](#step-1) (supplied with the payment initiation request), and it contains a key named `payment_processor`, it will be used to dynamically set the payment handler for that particular transaction. Valid value is any of [the providers listed above](#currently-supported-payment-handlers)
131134
132-
> [!NOTE] If the `Payment` has [`metadata`](#step-1) (supplied with the payment initiation request), with a key named `split_code`, for Paystack transactions, it will be processed as [Paystack Multi-split Transaction](https://paystack.com/docs/payments/multi-split-payments).
135+
> [!NOTE]
136+
> If the `Payment` has [`metadata`](#step-1) (supplied with the payment initiation request), with a key named `split_code`, for Paystack transactions, it will be processed as [Paystack Multi-split Transaction](https://paystack.com/docs/payments/multi-split-payments).
133137
134-
> [!NOTE] If there are additional steps you want to take upon successful payment, listen for `SuccessfulLaravelMultipayPaymentEvent`. It will be fired whenever a successful payment occurs, with its corresponding `Payment` model.
138+
> [!NOTE]
139+
> If there are additional steps you want to take upon successful payment, listen for `SuccessfulLaravelMultipayPaymentEvent`. It will be fired whenever a successful payment occurs, with its corresponding `Payment` model.
135140
136141
## Payment Conflict Resolution (PCR)
137142

0 commit comments

Comments
 (0)