-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add new fields y charge requests models * add new fields y charge requests models
- Loading branch information
Showing
28 changed files
with
1,682 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# # PaymentMethodGeneralRequest | ||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**expires_at** | **int** | Method expiration date as unix timestamp | [optional] | ||
**monthly_installments** | **int** | How many months without interest to apply, it can be 3, 6, 9, 12 or 18 | [optional] | ||
**type** | **string** | Type of payment method | | ||
**token_id** | **string** | | [optional] | ||
**payment_source_id** | **string** | | [optional] | ||
**contract_id** | **string** | Optional id sent to indicate the bank contract for recurrent card charges. | [optional] | ||
|
||
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# # PaymentMethodTokenRequest | ||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**type** | **string** | Type of payment method | | ||
**token_id** | **string** | Token id that will be used to create a \"card\" type payment method. See the (subscriptions)[https://developers.conekta.com/v2.1.0/reference/createsubscription] tutorial for more information on how to tokenize cards. | | ||
|
||
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
require __DIR__ . '/../../vendor/autoload.php'; | ||
use Conekta\Api\OrdersApi; | ||
use Conekta\Configuration; | ||
use Conekta\Model\OrderRequest; | ||
|
||
$config = Configuration::getDefaultConfiguration()->setAccessToken(getenv("CONEKTA_API_KEY")); | ||
$apiInstance = new OrdersApi(null, $config); | ||
|
||
|
||
$rq = new OrderRequest([ | ||
'line_items' => [ | ||
[ | ||
'name' => 'Nombre del Producto o Servicio', | ||
'unit_price' => 23000, | ||
'quantity' => 1 | ||
] | ||
], | ||
'currency' => 'MXN', | ||
'customer_info' => [ | ||
'name' => 'Jorge Martinez', | ||
'email' => 'jorge.martinez@conekta.com', | ||
'phone' => '+5218181818181' | ||
], | ||
'metadata' => [ | ||
'datos_extra' => '12334' | ||
], | ||
'charges' => [ | ||
[ | ||
'payment_method' => [ | ||
'type' => 'card', | ||
'number' => '4242424242424242', | ||
'name' => 'Jorge Martinez', | ||
'exp_month' => '12', | ||
'exp_year' => '2025', | ||
'cvc' => '198' | ||
] | ||
] | ||
] | ||
]); | ||
|
||
try { | ||
$result = $apiInstance->createOrder($rq); | ||
$json_string = json_encode($result, JSON_PRETTY_PRINT); | ||
print_r($json_string); | ||
} catch (Exception $e) { | ||
echo 'Exception when calling OrdersApi->createOrder: ', $e->getMessage(), PHP_EOL; | ||
|
||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.