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

Stripe plugin for Api #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kappa-london
Copy link

  • Not the final version! for test and review
  • Return value for Header() and Print"" needs a review ( we could not use your approach here )
  • Return from bank functions needs some review and routes

- Not the final version! for test and review
- Return value for Header() and Print"" needs a review.
- Return from bank functions needs some review and routes
Comment on lines +50 to +59
header('Access-Control-Allow-Origin: http://127.0.0.1:3000');
header('Access-Control-Allow-Credentials: true');
print json_encode(['data'=>['clientSecret'=>$intent->client_secret],'info'=>[
'amount' => $total,
'currency' => $currency,
'metadata' => ['integration_check' => 'accept_a_payment'],
'verify'=>$this->getConfigValue( 'payment.url-update' )
]]);
exit;
// return new \Aimeos\MShop\Common\Helper\Config\Standard( '', 'POST', [] );
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You definitely need to use the Form helper to return the data to the client in a jsonapi.org compatible format. This means that you need to change your PWA client that it doesn't expect this format but JSON API standard format instead. Your custom data will then be available in the "meta" section.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will come back with another implementation. Many thanks for answering

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

Successfully merging this pull request may close these issues.

3 participants