8

You want to use the State Machine methods of the Commerce Order class. It would be something like this, but it will depend on what you called your order states. $order_state = $orderObj->getState(); $order_state_transitions = $order_state->getTransitions(); $order_state->applyTransition($order_state_transitions['complete']); $orderObj->save();...


5

If found a simple way to disable the button through rules. Edit the configuration of the Paypal EC payment method and add a condition to the rule: Data Comparison / Commerce Order...state / Equal to 'Checkout' In this way, when the order is still in Shopping Cart state the payment method is disabled.


4

It is quite hard to do indeed. One way to do this is by setting a dummy billing address and hide the address form. You will need to do the following: In a custom module, add a CommerceCheckoutPane plugin. The plugin class should extend \Drupal\commerce_payment\Plugin\Commerce\CheckoutPane\PaymentInformation. Override the buildPaneForm() method, in there: ...


3

If this is an activity that you'll be repeating, like hosting events on a regular basis, I would step it up a notch and add CiviCRM to the Drupal installation. It will increase the complexity of your site by adding a new administrative area where you would manage the CRM components (at this point events and Payment Processors) but that additional complexity ...


3

TL:DR; Go to admin/config/people/profiles/types/manage/customer/form-display and disable the form elements you want to hide (config applies to entire site) Explanation It should be fairly easy to do this, though let me just say up front that I haven't tested this myself. What you are seeing as the address, is the "billing profile" (both the order ...


3

It's entirely dependent on your business needs. The advantage of Commerce Recurring is that as part of the Drupal Commerce ecosystem, it gives you a complete toolset for building a subscription management interface in Drupal 8. This will let you completely customize the checkout flow, order receipts, other user interfaces and more, but it does require ...


2

Thanks for your helping clues. I'm using Drupal Commerce V7.x-1.8 with drupal 7.26 and commerce_paypal WPS 7.x-2.3. I made a custom module named my_module. Code Below : function my_module_commerce_paypal_wps_order_form_data_alter(&$data, $order) { $user = user_load($order->uid); $profile_id = $order->commerce_customer_billing['und'][0]['...


2

Duplicate entry '' for key 'name': INSERT INTO {users} (uid, created, data) This is incorrect code, since no name value defined for inserting, so user name is empty and name should be unique - you cann't insert second user with empty name. Try find this code INSERT INTO {users} (uid, created, data) on your drupal files (modules), if no success, investigate ...


2

I'm assuming you're using the latest version of Commerce authnet. Drupal Commerce payment system (as well as discounts, taxes..) is based in rules, you can see here how the settings form are included: http://cgit.drupalcode.org/commerce/tree/modules/payment/commerce_payment.rules.inc#n250 in the rules UI, so it is basically stored by rules in a rules_config ...


2

I done this successfully, you have to follow these steps In Currency settings go to Currency conversion then select Synchronize rates on save. Then check the option "Synchronize all rates of this currency" below at your own currency. Then unchecked the option "Synchronize this conversion rate" below at USD and save settings. after that add product to your ...


2

The PayPal Payments Standard module only supports the currencies PayPal specifically identifies in its API documentation as supported currencies. When it encounters an unsupported currency, it converts it to whatever currency you have set as the default currency in the configuration of the related payment method rule. Since the default conversion rate is 1:1,...


2

Please check out Commerce Node Checkout Module It gives you a basic Pay to Pubish workflow, which is exactly what you are try achieve. As the project page says the module helps you Integrate with Commerce in order to allow you to charge users to create nodes.


2

The only code that would trigger a skip of the order confirmation page is in the checkout router hook implementation commerce_paypal_ec_commerce_checkout_router(). If you take a look at that, you'll see that it skips the confirmation page if the order either doesn't have a record in its data array that Express Checkout was used or if the customer used EC but ...


2

It's unfortunate that Authorize.Net identifies it as "Commerce Guys". It should be identifying the request as coming from "Drupal Commerce", which allows them to monitor adoption by users of the module overall (and justifies their continued investment in our community). I'll follow-up with them immediately to change this so it's actually identifying the ...


2

PayPal WPS submodule of Commerce PayPal provides only one payment option, which redirects the user to PayPal for payment. Credit card icons are there to let users know that at PayPal's end they will be able to make the payment via PayPal balance or using listed credit cards. You see only one radio button for PayPal WPS payment method because it is expected ...


2

This actually just isn't possible. The iframe depends on having a completed order object, which you can't possibly have (or know for certain) if it's on the same page as fields placed to collect user input to complete that order. The same is true for all redirect, tokenized, or iframe based payment solutions.


2

If your gateway tells you to redirect, you redirect. If you need a modal-based gateway, choose another gateway. Changing the flow recommended by your gateway puts you firmly in unsupported waters, and definitely exposes you to additional risk. This is especially true since redirected gateways require PCI A compliance, while modals require the slightly more ...


2

I suppose this can be done, but it won't be easy. There will be quite some components and you will have to write some code. Disclaimer is that I have not tested anything of this code, but I hope this to be useful to you. This example is based on the commerce_funds_withdraw_action() on line 932 of the Commerce Funds Withdraw Module, part of Commerce Funds. ...


2

Ok I sussed this out quicker than I expected. So for anyone else having this issue do this.. Login to the merchant account NOT the developer account. Menu on Top right Click Profile > Profile and settings My selling preferences > API access > update Under Pre-built payment solution > Manage API permission Under Option 2 > View API Signature Under View or ...


2

I think you are looking to "place" the order. You need to subscribe to the Event handler for this event: commerce_order.order.paid and with this handler code: public function paymentCompletedHandler($event) { $order = $event->getOrder(); $order->getState()->applyTransitionById('place'); return; }


2

Please change the code from \Drupal\commerce_order\Payment\Payment::loadByProperties(['order_id' => $order_id]); TO \Drupal::entityTypeManager() ->getStorage('commerce_payment') ->loadByProperties([ 'order_id' => [$orderid], ]);


2

It's been a long time since this has been asked, but I'm adding my input here since I bumped into this while looking for the exact same thing for one of my projects. The way I found as the cleanest and most straight forward, while reading through the documentation, is the use of an order processor class that would check the current order for the use of the ...


2

Yes - just create a new (custom, standard) payment method named Invoice, and user's then can select that. On the payment method edit form you can add more details, and even could limit the availability of the method. Rules are not actively supported as in D7: https://www.drupal.org/node/1535554 But I do not see a need using rules with your use-case. You need ...


1

Have a look at the Commerce Donate module. From its project page: This module provides a donation line item type along with a donation product and product display. This is partially based on Randy Fay's excellent screencast at http://commerceguys.com/blog/using-custom-line-items-provide-donation-fe... It uses the Select or Other module to provide the ...


1

I have struggled a bit with this, as have others apparently, but i found the solution in another thread. Every time an order object is loaded the following function is fired: commerce_cart_line_item_refresh() In this function the unit price of the Line Item is set to the current price of the original product, so even if you change the unit price, when you ...


1

The Paypal WPS API can be used to hold multiple individual items, but it can also just be used to handle a single order. It effectively does this by making the Drupal order the only product on the PayPal order. If you are wanting to customize checkout further, you'll need to find another processor that gives you that ability. PayPal PayFlow Pro or some ...


1

The answer is unfortunately no. PayPal will always display this as an option to the client, so you can't force the redirection back after the payment has been completed.


1

Although it's not recommended, you can comment these lines: $form['paypal_ec'] = array( '#type' => 'image_button', '#value' => t('Check out with PayPal'), '#src' => commerce_paypal_ec_button_url(), '#attached' => array( 'css' => array( drupal_get_path('module', 'commerce_paypal_ec') . '/theme/commerce_paypal_ec.theme.css', ), )...


1

In Drupal 7, you can use the form_state_values_clean() function that removes: form_id form_token form_build_id op Usage example: <?php /** * Let's say this is your form. */ function your_form($form, &$form_state) { // Form items go here. // Let's add the form actions element... $form['actions'] = array( '#type' => 'actions', ); ...


1

Following solution worked for me function custom_module_commerce_checkout_page_info_alter(&$checkout_pages) { $checkout_pages['payment']['status_cart'] = TRUE; }


Only top voted, non community-wiki answers of a minimum length are eligible