How to set a transaction ID for manual payment methods like cash on delivery - wordpress

I have a client offering free products and they want to bypass customers having to enter customer details but they rely on the transaction id to record orders from their QAD system connected via WooCommerce API.
My goal is to set a default transaction ID in the case that there is not one set from stripe or other payment methods. More specifically setting a transaction id to "FREESAMPLE" when someone checks out using Cash on Delivery.
This one is a little more complex and I didn't find anything on stack exchange for resolving this question.
I set up the payment method Cash on Delivery to only be available when the cart total is Zero dollars.
This worked, but Now they are not getting the order information in their QAD system due to not having the transaction ID.
I looked up the documentation for WooCommerce API about utilizing the transaction id field in orders and didn't find much in the way of setting a default option or an option for a payment method that doesn't generate a transaction ID from a third party payment gateway like Stripe.

Related

Booking system - WP

I need to do a reservation for 3 restaurants- in each there are 12 tables. Some of the reservations have to be paid before, the rest of them not at all.
Also, there is a need to identify if in the particular restaurant there is a reservation for different events- then the functionality of not-paid reservation must be switch off.
Ideally, if mails with reservations should be delivered to various email addresses - based on the name of the restaurant.
Everything must run on WP.
Can you please assist me with that?
For this system, I suggest you this solution.
I should say that using this answer requires average knowledge of PHP and WordPress functions.
Create a custom post type for Restaurants.
Information such as not-paid reservation, paid reservation, and events can be saved as meta values.
To save meta values for your custom post type, you can use the "advanced custom fields" plugin or just code them using add_meta_box().
For the reservations, you should make a form and in the form, users can select their reservation table, date, and time.
if the reservation requires payment, you should check the gateway documentation and use their script.
here you need to create a table in the database for payments.
after the form submits and before payment, add your user info to the database and give the payment status "pending" value.
after the successful or unsuccessful payment, the gateway will return the payment status and with that, you can save the reservation status.
For sending an email to the restaurant manager, after the successful payment, use wp_mail().
I tried to explain the whole project to you in 12 lines so, after reading this answer you may get confused.
If you have more questions, just ask.

WooCommerce Paypal - Disallow Payment based on PayPal Billing Address (Country Restriction)

A client of mine has some legal provisions that only allow him to offer PayPal as a payment method if the buyer's billing address is located in a specific country.
Naturally you can disable payment methods based on the billing address the buyer provides via WooCommerce. However, that is quite easy to manipulate.
PayPal asked them to implement a query, AFTER the buyer chose PayPal, signed into his account and accepted the payment method, to check if the billing address the buyer provided in his actual PayPal account is also located in that specific country. If so, the buyer proceeds to the 3rd checkout step and can finish his order. IF NOT, the buyer will be redirected to the 2nd checkout step, sees a note "This payment method is not available for your country" or whatever and can choose another payment method. So basically, the query has to check if the billing address is in a specific country and then decline the "payment execute" command.
I'm using the standard PayPal gateway that comes with WooCommerce. Does anyone have any idea how to make this work?
PS: Yes, retrieving the billing address from PayPal is usually not possible. However, my client got a special permit from PayPal to do so. So that's not an issue.
Using the PayPal Checkout plugin for WooCommerce, validate whether the response of the METHOD=GetExpressCheckoutDetails API call to PayPal contains the country you want, and use this to decide whether to let the customer proceed or not.

Recurring Payment For Credit Cards

The gateway I am using is Cardsave (http://www.cardsave.net). I obviously can't store credit cards on my servers, but to store credit cards on their servers, there needs to be an initial transaction. I am writing a billing management website that customers are going to be migrating to from other systems. There wouldn't be a reason to have their clients pay in between billing cycles.
The only solution I can think of is making a small payment to the credit card (like $1, PayPal style) and then either crediting this amount back to the customer on the next billing cycle, or issuing a refund. Is this the correct approach?
Is this the common way of handling recurring monthly 'subscriptions' where the amount is variable every month and don't start right away. For instance, is this how trial periods that require your credit card information to start is handled?
$1 charges are no longer allowed by Visa and MasterCard. You can do $0 authorizations so if your processor allows that you'll probably be able to do your original plan.
Some payment gateway providers, like Authorize.Net, offer services that allow you to create payment profiles and charge against them at any time for any amount. Their service is called Customer Information Manager. You should see if your provider offers a similar service.
For Cardsave Payment gateway you have Automated Subscriptions and Cross Reference Transaction Code Examples
For the reference check out this link: Click Here

Online Payments Using Paypal NVP Api

I am developing a website with online payment.
Payment is done using Paypal NVP Api.
There is need of a facility to store customers credit card details(not in database) once they register to Website.There onwards whenever they order these details will be fetched, Customer need not enter their card details for every order.
So is there any facility to create a profile n store credit card details of customer, as it is there for recurring payments?
This is not the idea of paypal, you are not allowed to store the customer credit cart and use them later by your self - if you do that, paypal see its and block your account in no time.
The paypal offer recurring payments, so you only need to initialize correct the paypal options and you have your solution.
Or get permission from visa, or master-cart to have the ability to keep local the credit cart informations. I must say that is very dangerous and if your system is not well protected you put your clients and your business in a big risk to lose the credit cart data and have real problems.
to store customers credit card details(not in database)
Where to you wish to store it ? in the paper :)?
Customer need not enter their card details for every order.
This is something that paypal take care of. You do not have to do something about.
You may want to check Recurly.com
they are providing support for Paypal and other gateways too. Plus great API documentation.
using it and definitely recommend it. 10 out of 10

How to transmit data recieved from the product/service buyers to the payment gateway?

I am willing to know how the process of sending the user account information, payment amount information as well as product/service id information to the payment gateway is conducted.
Where does the data from my last jsp page goes out there in the payment gateway?
How the transmitted information is synchronized and understood when they don't know my thing about the product/service m offering,prices and other flexibilities associated
or whether they expect me to be preparing a fully accomplished shopping cart and the finally tell them the final amount the buyer has to pay. what actually happens out there?
Most inline payment processors are willing to just take an amount. If you're sending the user to an external payment site, you'll normally have to send a cart. Each different payment processor will most likely give you a schema or webservice to use to send them a cart. The cart won't stay synchronized, just updated whenever you send that user to the payment processor.

Resources