Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please help getting started #222

Closed
focussing opened this issue Jul 3, 2018 · 11 comments
Closed

Please help getting started #222

focussing opened this issue Jul 3, 2018 · 11 comments

Comments

@focussing
Copy link

I tried to install the api via Composer or via ZIP download, but none of the described ways I get the \Mollie\api folder...

What am I doing wrong?

@holtkamp
Copy link
Contributor

holtkamp commented Jul 9, 2018

composer typically installs it in a vendor folder. By using autoloading you can then use it in your userland code

@focussing
Copy link
Author

Hello @holtkamp , thank you for your reaction. Sorry but I do not have any idea how to do that... I struggled already for a few hours before I got the Composer thing working.

Couldn't you simply provide a zip file containing the api? We choose Mollie because of it's many interfacing possibilities but we are getting nowhere...

Many many thanks!!

@Smitsel
Copy link
Contributor

Smitsel commented Jul 13, 2018

Hi @focussing,

Sorry for the delay! We already have these zips available for you.
The latest one is: https://github.com/mollie/mollie-api-php/releases/download/v2.0.6/mollie-api-php.zip

When u download and extract this and place it in your development folder, make sure to require the vendor/autoload.php file like this:
require_once __DIR__ . "/vendor/autoload.php";

This way all the classes will be loaded and you can start using the client.
Make sure to check out the examples. They will get you started.

Hope this helps!

@holtkamp
Copy link
Contributor

Hi @focussing

I struggled already for a few hours before I got the Composer thing working.

Composer is the "accepted standard" for dealing with dependencies in PHP projects. While a single .ZIP archive of the Mollie library might be easy to get things going, on the long run I would really advise to use Composer for this. It will make it really easy to upgrade to new versions, etc.

Good luck!

@Smitsel
Copy link
Contributor

Smitsel commented Jul 17, 2018

Hope you got it running @focussing.

If you still run in to trouble, please check out our support articles:
https://help.mollie.com/hc/nl/categories/201332145-Integratie

Or contact our support department.

@Smitsel Smitsel closed this as completed Jul 17, 2018
@focussing
Copy link
Author

Thank you, I was out for a while.
It works, I can call the api/examples by typing them directly in the browser address bar.
Is there an example of adressing the api for let's say example nr 04 from javascript?

@Smitsel
Copy link
Contributor

Smitsel commented Aug 6, 2018

Hi! Great that it worked with the feedback.
Can you please forward this and future questions to: techsupport@mollie.com?

@focussing
Copy link
Author

I will, thank you. English or Dutch? :)

@Smitsel
Copy link
Contributor

Smitsel commented Aug 6, 2018

They can help you in both ;)

@focussing
Copy link
Author

I hope so; sent them a question at 13:36, hopefully they answer soon :)

I am able to create payments from my javascript application, and list all of them.
Changed example 05 for that; basically adding

    $payments = $mollie->payments->page();
    echo json_encode($payments, JSON_FORCE_OBJECT);

However I cannot get example 04 to work properly; when I call the PHP script from my application (filling in amount parameters etc), according the guides; "Test payments come with a hosted payment page that allows you to select whether your test payments are successful or not without spending actual money.".

In the example 04 script there is a line $payment->getCheckoutUrl() https://www.mollie.com/paymentscreen/issuer/select/ideal/bjDqfNz7dk which is called after creating the payment. But that gives a CORS error:

Failed to load https://www.mollie.com/paymentscreen/issuer/select/ideal/Fu2fzGMRfg: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.monsteragenda.nl' is therefore not allowed access.

If you need I can send you the url not openly ;)

@focussing
Copy link
Author

@Smitsel found it... so easy finally; I had to call the checkoutUrl mysel in my application....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants