Commit 2ae62aeb authored by jsacksick's avatar jsacksick

Issue #3043099 by jsacksick: Add a hook_commerce_paypal_checkout_create_order_request_alter().

parent d4a8d6f7
<?php
/**
* @file
* Documents hooks provided by the Commerce PayPal Checkout module.
*/
/**
* Allows modules to alter the request body before the create order API call is
* made to PayPal.
*
* @param array $request_body
* The request body.
* @param $order
* The order.
*/
function hook_commerce_paypal_checkout_create_order_request_alter(&$request_body, $order) {
// No example.
}
......@@ -171,6 +171,7 @@ function commerce_paypal_checkout_create_order($order, $payment_method) {
}
try {
$request_body = commerce_paypal_checkout_prepare_order_request($order, $payment_method['settings']);
drupal_alter('commerce_paypal_checkout_create_order_request', $request_body, $order);
$json = $api_client->createOrder($request_body);
drupal_json_output(array('id' => $json['id']));
drupal_exit();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment