diff --git a/README.md b/README.md index 71694c3..8616842 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ $order = $client->getOrderApi()->escalate(1, [ # Bind card to order $order = $client->getOrderApi()->bind(1, 1, [ - 'card_id' => 1, + 'supplier_payout_card_id' => 1, ]); ``` @@ -125,7 +125,7 @@ $setting = $client->getSettingApi()->edit([ ### 3.4: Usage Calculate Api ```php # Calculate -$setting = $client->getCalculateApi()->calculate([ +$calculate = $client->getCalculateApi()->calculate([ 'price' => 1000, 'service_cost_payer' => Order::PAYER_HALF, // or Order::PAYER_CONSUMER or Order::PAYER_SUPPLIER ]); diff --git a/composer.json b/composer.json index 8d621d0..04fc7fb 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "vragovr/safecrow-api", "description": "SafeCrow API v3 Client", - "version": "1.0.3", + "version": "1.0.4", "type": "library", "keywords": [ "http", diff --git a/src/Api/OrderApi.php b/src/Api/OrderApi.php index 94316b3..8c2f26c 100644 --- a/src/Api/OrderApi.php +++ b/src/Api/OrderApi.php @@ -182,9 +182,9 @@ public function bind(int $userId, int $orderId, array $params) : Order $resolver = new OptionsResolver(); $resolver ->setRequired([ - 'card_id', + 'supplier_payout_card_id', ]) - ->setAllowedTypes('card_id', 'int'); + ->setAllowedTypes('supplier_payout_card_id', 'int'); $params = $resolver->resolve($params);