generate_gateway_url - get the redirects url for a payment gateway
As i written many times, Midrub is a CMS for business and my goal is to cover any kind of businesses. Any kind of businesses could have any kind of payments. For example someone wants a store, someone wants to rent something, someone wants to have subscribtions, someone wants to have a live platform where users in the chat will send money, someone wants a new payments gateway like PayPal or other kind, someone wants to have a classifieds website where clients will pay to promote their ads, etc. For all these purposes Midrub needs to provide a universal solution to help the businesses.
My way to solve this is the method generate_gateway_url. This method is cool and could cover any situation and needs. In this method you will enter your parameters and it will provide a redirect link to wanted gateway. The parameters will allow to cover any kind of needs.
So let's take a look to the method generate_gateway_url:
generate_gateway_url(array( 'pay' => array(), 'options' => array(), 'fields' => array() ));
What means these parameters?
- pay - contains the amount with currency to pay.
- options - contains the options like if the user will be subscribed for recurring payments, if is one time payment, if the subscribe payment checkbox will be displayed, etc.
- fields - contains the transaction's details. In the administrator's panel you have the page with all transactions. You can see the details and with the fields you will show additional information in the transaction's details.
Each fields in the fields parameters have 3 sub-fields: label, slug and value. Another interesting use of the fields will for invoices. You will be able to create your invoices models and just add [field_slug] which will be replaced automatically. For example you want to show in invoices the user's address, you will create a field with user's address and just will add in your invoice the text [user_address].
I have idea how to use the generate_gateway_url to cover all situations described above.
- How to upgrade the Facebook Api from 3.2 or 3.3 to 4.0
- How to change the menu's icons in Midrub
- Midrub Payments Structure
- Midrub Stream Introduction
- How to boost posts automatically on Facebook, Instagram and Messenger
- Add Api permissions from your apps or components
- How to send email in Midrub and how understand why you're emails aren't sending
- How works the Quick Scheduler to publish posts with several clicks
- How to create a new menu for the user's panel
- the_db_request in midrub frontend themes