From c097df2eab33b358614a708f7005d33a332d6405 Mon Sep 17 00:00:00 2001 From: Alejandro Mostajo Date: Thu, 25 Jun 2015 20:59:10 -0600 Subject: [PATCH] Readme update. --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d6c760c..58fcb72 100644 --- a/README.md +++ b/README.md @@ -713,7 +713,7 @@ To empty cart: $cart->clear(); ``` -This methods can be chained: +These methods can be chained: ```php $cart->add($product, 5) @@ -889,11 +889,11 @@ $completed_orders = Order::whereUser($userId) Status codes out of the box: - `in_creation` — Order status in creation. Or use `$order->isInCreation`. -- `pending` — i.e. Pending for payment. Or use `$order->isPending`. -- `in_process` — i.e. In process of shipping. In process of revision. Or use `$order->isInProcess`. -- `completed` — i.e. When payment has been made and items were delivered to client. Or use `$order->isCompleted`. -- `failed` — i.e. When payment failed. Or use `$order->hasFailed`. -- `canceled` — i.e. When an order has been canceled by the user. Or use `$order->isCanceled`. +- `pending` — Pending for payment. Or use `$order->isPending`. +- `in_process` — In process of shipping. In process of revision. Or use `$order->isInProcess`. +- `completed` — When payment has been made and items were delivered to client. Or use `$order->isCompleted`. +- `failed` — When payment failed. Or use `$order->hasFailed`. +- `canceled` — When an order has been canceled by the user. Or use `$order->isCanceled`. You can use your own custom status codes. Simply add them manually to the `order_status` database table or create a custom seeder like this: @@ -970,7 +970,7 @@ class GatewayPayPal extends PaymentGateway } ``` -The gateway will require those `onCharge` method as minimun. You can add more depending your needs. +The gateway will require `onCharge` method as minimun. You can add more depending your needs. Once created, you can add it to the `shop.php` config file, like: @@ -1006,8 +1006,8 @@ public function onCharge($order) } ``` - `transactionId` — Provider's transaction ID, will help identify a transaction. -- `detail` — i.e. Custom description for the transaction. -- `statusCode` — i.e. Order status code with which to update the order after onCharge has executed. By default is 'completed'. +- `detail` — Custom description for the transaction. +- `statusCode` — Order status code with which to update the order after onCharge has executed. By default is 'completed'. ### Callbacks @@ -1081,7 +1081,7 @@ class GatewayWithCallbacks extends PaymentGateway } } ``` -In the example above, `onCharge` instead of creating a completed transaction, it is creating a pending transaction and indicating the provider to which urls to call back with the payment results. By default the shop generates a token and it is used for validations in the callback, you can change the token value to your needs. +In the example above, `onCharge` instead of creating a completed transaction, it is creating a pending transaction and indicating the provider to which urls to call back with the payment results. The methods `onCallbackSuccess` and `onCallbackFail` are called by `Shop` when the provider calls back with its reponse, the proper function will be called depending on the callback url used by the provider.